While performing a simple hover test on Firefox through Selenium (3.4.0) with Python bindings (3.4.3) using any of the available OS in SauceLabs (except Linux, for which the latest available Firefox version is too old), by performing the following ActionChain:
hover = ActionChains(driver)
hover.move_to_element(elm_Men_Menu).perform()
It throws the following error:
Taceback:
File [...] in testHover
hover.perform()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/action_chains.py", line 80, in perform
action()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/action_chains.py", line 290, in <lambda>
Command.MOVE_TO, {'element': to_element.id}))
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: mouseMoveTo
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'itako44164.prod.miso', ip: '[...]', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.1', java.version: '1.8.0_112'
Driver info: driver.version: RemoteWebDriver
Stacktrace:
at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode (AbstractHttpCommandCodec.java:220)
at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode (AbstractHttpCommandCodec.java:118)
at org.openqa.selenium.remote.HttpCommandExecutor.execute (HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute (DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute (RemoteWebDriver.java:637)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute (RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove (RemoteMouse.java:89)
at org.openqa.selenium.support.events.internal.EventFiringMouse.mouseMove (EventFiringMouse.java:58)
at org.openqa.selenium.remote.server.handler.interactions.MouseMoveToLocation.call (MouseMoveToLocation.java:59)
at org.openqa.selenium.remote.server.handler.interactions.MouseMoveToLocation.call (MouseMoveToLocation.java:32)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at org.openqa.selenium.remote.server.DefaultSession$1.run (DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
at java.lang.Thread.run (Thread.java:745)
Locally it works perfectly. I'm, using geckodriver 0.17.0 and Selenium 3.4.3 (edited). This was a previously reported error in Selenium, but it was solved for Selenium 3.x and geckodriver 0.15.0 (https://github.com/SeleniumHQ/selenium/issues/2285). For the SauceLabs test I am using Selenium 3.4.0 (as can be seen in the error report) and in SauceLabs documentation, for Firefox 53 and higher versions, geckodriver 0.16.0 is used (https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-SeleniumVersion), which, in principle, should support the move_to_element() action.
Is there something I am doing wrong? Is there a way to specify the geckodriver version? By now, the desired capabilities look like this:
desired_cap = {
'platform':"Mac OS X 10.12",
'browserName':"firefox",
'version':"54",
'seleniumVersion':"3.4.0",
}
Edit 1: I did not mention it, but it is working with both Chrome and IE11
Edit 2: The same problem occurs when executing the code locally with the selenium standalone server (3.4.0) in Linux. The geckodriver version is 0.17.0. Exact same traceback except for System info: host:
Solved:
Selenium was already aware of this problem:
https://github.com/SeleniumHQ/selenium/issues/4008
It has already been solved and will be available in the 3.5 version:
https://github.com/SeleniumHQ/selenium/issues/3808#issuecomment-311105917
By now it can be solved cloning the master repository, building yourself the selenium server and starting the nodes with the -enablePassThrough
flag