require 'interactor/shared'

module Interactor
  module Clicker
    class << self
      include Shared

      def click_on(position)
        run("xdotool mousemove --sync #{position.first} #{position.last}")
        sleep 1
        run('xdotool click --clearmodifiers 1')
        sleep 2
      end
    end
  end
end

require 'interactor/shared'

module Interactor
  module Clicker
    class << self
      include Shared

      def click_on(position)
        run("xdotool mousemove --sync #{position.first} #{position.last}")
        sleep 1
        run('xdotool mousedown --clearmodifiers 1')
        sleep 0.2
        run('xdotool mouseup 1')
        sleep 2
      end
    end
  end
end

Fix Clicker to do button down and up
Fix Clicker to do button down and up

That fixed some random occurrences of clicks not
triggering the action clicked.

For example clicking a label of a checkbox was not
marking the checkbox.
