Issue
After upgrading all my ruby gems including watir-webdriver to the latest v0.9.9 I got the below error when my script tries to right click on an element
Below is the code that executes the And I right click on layer 1 in the import tab step
def select_layer_import_tab(layer_num)
layer_index = (layer_num.to_i - 1)
@browser.divs(:class => "legend")[layer_index].img.click
@browser.divs(:class => "legend")[layer_index].img.right_click <--------------------- error happens here ------------
end
Here are my gems list versions prior to upgrade:
* LOCAL GEMS *
bigdecimal (1.2.0) builder (3.2.2) bundler (1.10.6) bundler-unload (1.0.2) childprocess (0.5.8, 0.5.7) chunky_png (1.3.5) cucumber (2.1.0) cucumber-core (1.3.0) data_magic (0.21) diff-lcs (1.2.5) executable-hooks (1.3.2) faker (1.6.1) ffi (1.9.10) gem-wrappers (1.2.7) gherkin3 (3.1.2) headless (2.2.0) i18n (0.7.0) io-console (0.4.2) json (1.7.7) minitest (4.3.2) multi_json (1.11.2) multi_test (0.1.2) oily_png (1.2.0) page-object (1.1.0) page_navigation (0.9) psych (2.0.0) rake (10.4.2, 0.9.6) rdoc (4.0.0) require_all (1.3.3) rspec (3.4.0) rspec-core (3.4.1) rspec-expectations (3.4.0) rspec-mocks (3.4.0) rspec-support (3.4.1) rubygems-bundler (1.4.4) rubyzip (1.1.7) rvm (1.11.3.9) selenium-webdriver (2.48.1) test-unit (2.0.0.0) testgen (0.8.7) thor (0.19.1) watir-webdriver (0.9.1) websocket (1.2.2) yard (0.8.7.6) yml_reader (0.5)
Here are my gems list versions post upgrade:
* LOCAL GEMS *
bigdecimal (1.3.2, 1.2.0) builder (3.2.3, 3.2.2) bundler (1.15.2, 1.10.6) bundler-unload (1.0.2) childprocess (0.7.1, 0.5.8, 0.5.7) chunky_png (1.3.8, 1.3.5) connection_pool (2.2.1) cucumber (2.4.0, 2.1.0) cucumber-core (1.5.0, 1.3.0) cucumber-wire (0.0.1) data_magic (1.0, 0.21) diff-lcs (1.3, 1.2.5) executable-hooks (1.3.2) faker (1.6.1) ffi (1.9.18, 1.9.10) gem-wrappers (1.3.0, 1.2.7) gherkin (4.1.3) gherkin3 (3.1.2) headless (2.3.1, 2.2.0) i18n (0.8.6, 0.7.0) io-console (0.4.6, 0.4.2) json (2.1.0, 1.7.7) minitest (5.10.2, 4.3.2) multi_json (1.12.1, 1.11.2) multi_test (0.1.2) oily_png (1.2.1, 1.2.0) page-object (1.1.0) page_navigation (0.10, 0.9) power_assert (1.0.2) psych (2.2.4, 2.0.0) rake (12.0.0, 10.4.2, 0.9.6) rdoc (5.1.0, 4.0.0) require_all (1.4.0, 1.3.3) rspec (3.6.0, 3.4.0) rspec-core (3.6.0, 3.4.1) rspec-expectations (3.6.0, 3.4.0) rspec-mocks (3.6.0, 3.4.0) rspec-support (3.6.0, 3.4.1) rubygems-bundler (1.4.4) rubyzip (1.2.1, 1.1.7) rvm (1.11.3.9) selenium-webdriver (3.4.4, 2.48.1) test-unit (3.2.5, 2.0.0.0) testgen (0.9, 0.8.7) thor (0.19.4, 0.19.1) watir-webdriver (0.9.9, 0.9.1) websocket (1.2.4, 1.2.2) yard (0.9.9, 0.8.7.6) yml_reader (0.7, 0.5)
Other environment information:
- Debian Linux Wheezy v7.1
- ruby 2.0.0p643 (2015-02-25 revision 49749)
- Chrome Browser v45.0.2454.85
- Using xvfb to render the above browser in a headless linux environment
- ChromeDriver 2.20.353124
I've tried looking around on forums for this specific error but can't find anything. I also wanted to try upgrading to the latest Chrome browser and Chromedriver version however it would appear that the latest version of the google chrome browser no longer supports Debian Wheezy so I am stuck with what I got.
Any ideas would be greatly appreciated.
Solution
Selenium 3 removed Driver Extension checks for input that watir-webdriver
accessed directly. Updating code to latest Watir version will fix this. (as well as provide a number of extra functions and performance improvements).
Answered By - titusfortner