selenium: When using FirefoxDriver+geckodriver, Action.mouseMoveTo() thows an UnsupportedCommandException
Meta -
OS: OpenSUSE Linux 42.2 64-bit Selenium Version: 3.5.3 Browser: Firefox 52.3.0 ESR GeckoDriver Version: 18
Expected Behavior -
When FirefoxDriver is created with a geckodriver specified, and mouseMoveTo() eventually called on a WebElement, it works as expected, without throwing an exception
Actual Behavior -
UnsupportedCommandException thrown
Steps to reproduce -
In Java, first create a FirefoxDriver, and open a URL:
System.setProperty("webdriver.gecko.driver", "/tmp/geckodriver");
RemoteWebDriver driver = new FirefoxDriver();
driver.get("https://github.com/SeleniumHQ");
then call moveToElement:
WebElement elm = driver.findElement(By.xpath("//a[contains(@href, '/SeleniumHQ')]"));
Actions actions = new Actions(driver);
actions.moveToElement(elm).perform();
Note that I found this issue:
“UnsupportedCommandException mouseMoveTo with 3.4 on firefox with geckodriver 0.16.1 #4008”
which would at first seem to be the same, but it was closed by jimevans as being the same as
“Grid does not handle w3c capabilities correctly #3808”
but #3808 is ALSO closed, with the apparent fix/workaround of adding “-enablePassThrough true” to the Java command-line invocation of a standalone Selenium server.
Well, I’m not using Grid or a standalone Selenium server, so how do I pass this option? Why is #3808 closed when as of Selenium v3.5.3, I’m still hitting the issue? Is there a way to set “enablePassThrough” in the DesiredCapabilities when I call the constructor for FirefoxDriver?
Note, I’m using the geckodriver with FirefoxDriver, not the legacy mode, and I don’t want to use the legacy mode as I want to support FF 55+. Is FirefoxDriver no longer supported? As recently as 10 days ago, someone has been tweaking the FirefoxDriver.java source, so it doesn’t look like it’s dead.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (7 by maintainers)
We are facing the same issue of “UnsupportedCommandException: mouseMoveTo” with FF59.1 on Saucelab and latest Selenium 3.12.0. Does any body know how to overcome this using JavaScript ?