Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox 13 broke selenium tests

Apparently I upgraded my Firefox this morning along with some other system updates and now my selenium tests are broken! They worked fine yesterday and all passed. Performing hovers seems to be an issue. This is the error I got:

Traceback (most recent call last):
File "sel.py", line 201, in testAddContent
hoveredElement.perform()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/action_chains.py", line 44, in perform
action()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/action_chains.py", line 201, in <lambda>
self._driver.execute(Command.MOVE_TO, {'element': to_element.id}))
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 155, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 147, in check_response
raise exception_class(message, screen, stacktrace)
InvalidElementStateException: Message: u'Cannot perform native interaction: Could not load native events component.' ; Stacktrace: Method generateErrorForNativeEvents threw an error in file:///tmp/tmpq2yHMn/extensions/[email protected]/components/driver_component.js 
like image 904
S.Muse Avatar asked Jun 06 '12 14:06

S.Muse


2 Answers

You need Selenium 2.23, which was released yesterday.

like image 180
Ross Patterson Avatar answered Sep 21 '22 13:09

Ross Patterson


One option is to run against an older version of Firefox. I include an older copies of firefox in the source tree to test SizSelCsZzz (https://github.com/fschwiet/SizSelCsZzz/tree/master/browser_archive). For C#, using such an exe is like:

var firefoxProfile = new FirefoxProfile();
var browser = new FirefoxDriver(new FirefoxBinary(exePath), firefoxProfile);
like image 41
Frank Schwieterman Avatar answered Sep 20 '22 13:09

Frank Schwieterman