After finding this stackoverflow q/a about how to click on an element based on its coordinates, I'm trying to do so to click on a button I've discussed in this question. Currently having to use the cliclick shell command for mac osx which is clunky. Anyway, here is the section of my Gemfile showing the watir related gems in order -- perhaps I've required more gems than is necessary?
gem 'selenium-webdriver'#, '2.45.0'
gem 'selenium'#, '0.2.11'
gem 'watir', '5.0.0'
Here's the full command I've run to get the error:
b = Watir::Browser.new #defaults to firefox
#...
element = b.span(:text => "Confirm Selection")
b.driver.action.move_to(element, 15, 15).click.perform
#=>
TypeError: expected Selenium::WebDriver::Element, got #<Watir::Button:0x39fe077c86d90f06 located=false selector={:id=>"id_280", :tag_name=>"button"}>:Watir::Button
from /Users/davo/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/mouse.rb:86:in `assert_element'
from /Users/davo/.rvm/gems/ruby-2.2.1/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/common/mouse.rb:69:in `move_to'
from (irb):79
from /Users/davo/.rvm/gems/ruby-2.2.1/gems/railties-4.0.0/lib/rails/commands/console.rb:90:in `start'
from /Users/davo/.rvm/gems/ruby-2.2.1/gems/railties-4.0.0/lib/rails/commands/console.rb:9:in `start'
from /Users/davo/.rvm/gems/ruby-2.2.1/gems/railties-4.0.0/lib/rails/commands.rb:64:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Let me know if any more details would help.
System details:
- rails 4.0.0
- mac osx el capitan 10.11.1
- firefox 46.0.1
- selenium gem 0.2.11
- selenium-webdriver gem 2.53.0
- watir gem 5.0.0
- watir-webdriver gem 0.9.1