I'm pretty new to selenium and when i'm running code below for Selenium WebDriver in Eclipse (Java), i'm getting this exception:
"Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: mouseMoveTo"
Here is the code:
WebDriver driver = new FirefoxDriver();
driver.get("http://newtours.demoaut.com/");
WebElement myElement = driver.findElement(By.cssSelector("input[name=userName]"));
Actions myAction = new Actions(driver);
myAction.moveToElement(myElement)
.click()
.keyDown(myElement, keys.SHIFT)
.sendKeys(myElement, "test")
.keysUp(myElement, keys.SHIFT)
.(myElement)
.contextClick()
.build()
.perform();
What causes this error?
Thanks and regards.
There is a known issue with the new Version of the FirefoxDriver namely the GeckoDriver, which doesn´t support the Action class see:
Selenium web driver moveToElement (Actions) throwing error with marionette driver?
https://github.com/SeleniumHQ/selenium/issues/3348
Without more info I´d assume this is also your problem. If you need to test with FF then use an older version or Chrome with the ChromeDriver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With