OS:
OSX 10.11.6
Selenium Version:
3.3.1
Browser:
Firefox
Browser Version:
52.1
As per https://github.com/SeleniumHQ/selenium/issues/2285, mouse hover events should work with selenium 3.x and geckodriver 0.15.
It gives error :
org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MacBook-Pro-4.local', ip: 'fe80:0:0:0:6203:8ff:fea6:d310%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_91'
Driver info: driver.version: RemoteWebDriver
Command duration or timeout: 9 milliseconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:43)
at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:637)
at org.openqa.selenium.interactions.Actions.perform(Actions.java:596)
at PageObjects.CoverStoriesPage.tap_NextButton_onHints(CoverStoriesPage.java:435)
at PageObjects.CoverStoriesPage.commentOnArticle(CoverStoriesPage.java:325)
at tests.CoverStoriesTest.addCommentOnArticle(CoverStoriesTest.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1129)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:746)
at org.testng.TestRunner.run(TestRunner.java:600)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1264)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1189)
at org.testng.TestNG.runSuites(TestNG.java:1104)
at org.testng.TestNG.run(TestNG.java:1076)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:152)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:57)
Caused by: org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MacBook-Pro-4.local', ip: 'fe80:0:0:0:6203:8ff:fea6:d310%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_91'
Driver info: driver.version: RemoteWebDriver
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'MacBook-Pro-4.local', ip: 'fe80:0:0:0:6203:8ff:fea6:d310%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_73'
Driver info: driver.version: RemoteWebDriver
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:157)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
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)
// Switch to new window opened
for(String winHandle : driver.getWindowHandles()){
driver.switchTo().window(winHandle);
}
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
WebElement copyrightLink=driver.findElement(copyright);
Actions actions1 = new Actions(driver);
actions1.moveToElement(copyrightLink).perform();
actions1.click().perform();
Thread.sleep(1000);
Same exception iam also getting
Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'DESKTOP-9ISPGDN', ip: '192.168.1.100', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
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:157)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:43)
at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:637)
at Test.main(Test.java:25)
Are you using standalone server?
Yes iam using standalone server
i tried with standalone and Selenium client also both it is not working
xception in thread "main" org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'DESKTOP-9ISPGDN', ip: '192.168.1.101', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
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:157)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:43)
at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:637)
I'm not sure standalone is handling w3c commands correctly yet, but through the bindings it should work.
How are you constructing your driver?
Actually no iam using geckodriver.
Huh?
public static void main(String[] args)
{
WebDriver driver = new FirefoxDriver();
System.setProperty("webdriver.gecko.driver", "./geckodriver.exe");
driver.get("http://www.google.com");
Actions ac = new Actions(driver);
ac.moveToElement(driver.findElement(By.id("lst-ib")));
ac.build().perform();
}
Can you try it with an absolute path for the webdriver.gecko.driver property
i tried but it not working
same exception
INFO: Detected dialect: W3C
Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'DESKTOP-9ISPGDN', ip: '192.168.1.101', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
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:157)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:43)
at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:36)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:637)
What version of geckodriver are you using?
geckodriver - 15.0
firefox version 47.0.2
In the issue you mentioned Firefox 52, which one are you using?
I am facing the same problem:
Firefox 52.0.2
Geckodriver 0.15.0
Selenium 3.3.1 standalone
org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: '-', ip: '192.168.100.175', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_77'
Driver info: driver.version: RemoteWebDriver
It looks like it is trying to use the old non-w3c actions commands with geckodriver, will have to investigate
I tried to use w3c actions and ran into another problem. It seems the FindElement command returns the element id as "ELEMENT" but pointerMove action is expecting element-6066-11e4-a52e-4f735466cecf for origin. Am I doing something wrong or is there a way to get the UUID of the element or send element for origin?
find element request
http://127.0.0.1:4444/wd/hub/session/626617cd-0379-4f6f-9254-a99e64de49cd/element {"using":"tag name","value":"body"}
response
{"state":"success","sessionId":"626617cd-0379-4f6f-9254-a99e64de49cd","hCode":1612932487,"value":{"ELEMENT":"0"},"class":"org.openqa.selenium.remote.Response","status":0}
pointerMove request using element-6066-11e4-a52e-4f735466cecf for origin
http://127.0.0.1:4444/wd/hub/session/1603bd9a-42be-4f30-a9ab-9a2022c3d1b4/actions {"actions":[{"actions":[{"duration":1,"origin":{"element-6066-11e4-a52e-4f735466cecf":"0"},"type":"pointerMove","x":0,"y":0}],"id":"mouse","parameters":{"pointerType":"mouse"},"type":"pointer"}]}
response
org.openqa.selenium.JavascriptException: Element reference not seen before: 0
pointerMove request using element for origin
http://127.0.0.1:4444/wd/hub/session/626617cd-0379-4f6f-9254-a99e64de49cd/actions {"actions":[{"actions":[{"duration":1,"origin":{"element":"0"},"type":"pointerMove","x":0,"y":0}],"id":"mouse","parameters":{"pointerType":"mouse"},"type":"pointer"}]}
response
org.openqa.selenium.InvalidArgumentException: Could not find webelement key
thanks in advance
Also get mouseMoveTo errors trying to run tests through protractor 5.x.
Selenium Standalone 3.3.1
geckodriver 0.15
Firefox 52.0
UnsupportedOperationError: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'WIN8TESTSERVER', ip: 'xxx.xxx.xx.xx', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
at WebDriverError (.\node_modules\selenium-webdriver\lib\error.js:27:5)
at UnsupportedOperationError (.\node_modules\selenium-webdriver\lib\error.js:319:5)
at Object.checkLegacyResponse (.\node_modules\selenium-webdriver\lib\error.js:505:15)
at parseHttpResponse (.\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (.\node_modules\selenium-webdriver\lib\http.js:440:13)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: mouseMove
at thenableWebDriverProxy.schedule (.\node_modules\selenium-webdriver\lib\webdriver.js:816:17)
at actions.map.action (.\node_modules\selenium-webdriver\lib\actions.js:124:23)
at Array.map (native)
at .\node_modules\selenium-webdriver\lib\actions.js:123:29
at TaskQueue.execute_ (.\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (.\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at asyncRun (.\node_modules\selenium-webdriver\lib\promise.js:2813:27)
at .\node_modules\selenium-webdriver\lib\promise.js:676:7
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: ActionSequence.perform
at ActionSequence.perform (.\node_modules\selenium-webdriver\lib\actions.js:122:33)
at Object.<anonymous> (.\e2e-tests\tmp-out\specs\dashboard\widgets\VirtualSensorWidget.e2e.js:66:87)
at .\node_modules\jasminewd2\index.js:110:25
at new ManagedPromise (.\node_modules\selenium-webdriver\lib\promise.js:1067:7)
at ControlFlow.promise (.\node_modules\selenium-webdriver\lib\promise.js:2396:12)
at schedulerExecute (.\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (.\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (.\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at asyncRun (.\node_modules\selenium-webdriver\lib\promise.js:2860:25)
at .\node_modules\selenium-webdriver\lib\promise.js:676:7
From: Task: Run it("should have 'is-on' class while mouse down in direct mode") in control flow
at Object.<anonymous> (.\node_modules\jasminewd2\index.js:94:19)
at attemptAsync (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1980:24)
at QueueRunner.run (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1935:9)
at QueueRunner.execute (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1923:10)
at Spec.queueRunnerFactory (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:714:35)
at Spec.execute (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:371:10)
at Object.fn (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:2579:37)
at attemptAsync (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1980:24)
at QueueRunner.run (.\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1935:9)
at .\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1962:16
I ran into this as well where with the client bindings using Capybara the hover actions worked properly in Firefox 52, geckodriver 0.15, and selenium-3.3.1, but received this exception with the standalone server
Any update on this? I'm running into the same issue I believe, Caused by: org.openqa.selenium.UnsupportedCommandException: mouseMoveTo.
I'm using the Docker Selenium Grid (version 3.3.1) and RemoteWebDriver: new RemoteWebDriver(new URL(getRemoteHubAddress()), DesiredCapabilities.firefox());.
selenium 3.4.0
Gecko Driver: 0.16.0
iam getting this exception now
Exception in thread "main" org.openqa.selenium.WebDriverException: performActions
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'DESKTOP-9ISPGDN', ip: '192.168.0.7', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, appBuildId=20161031133903, version=47.0.2, platform=XP, proxy=Proxy(), command_id=1.0, specificationLevel=0.0, acceptSslCerts=false, browserVersion=47.0.2, platformVersion=10.0, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=Firefox, takesScreenshot=true, takesElementScreenshot=true, javascriptEnabled=true, platformName=Windows_NT, device=desktop}]
Session ID: dd33adcc-4b60-4d62-b32a-12fcf9db58ee
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
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.RemoteWebDriver.perform(RemoteWebDriver.java:703)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:631)
at com.Test.main(Test.java:24)
I am getting this error as well:
WebDriver\Exception\UnknownCommand: mouseMoveTo
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'MacBook-Pro.local', ip: 'fe80:0:0:0:18ac:e652:7c56:e57c%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver in vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php:155
Fixed in Selenium 3.4 + geckodriver 0.16
@barancev This is not fixed... @dannyfinks is correct, this works using native client bindings but not via HTTP requests through Selenium Grid, checked when running locally everything works, when running via a Grid setup it appears that HTTP listener for Selenium is not setup to accept a moveTo call.
Tested using 3.4.0 (both strict and using Selenium Grid Extras)
@barancev This has also been found to be the case not only in Ruby's Capybara but also using JUnit from Java/Groovy.
I would be willing to contribute a test to this project in order to make sure that it in fact is working for the next release.
Sample Gist: https://gist.github.com/mikesalvia/3415514c0a0bc637c579454969bc4ab3 This visits Google and attempts a hover and click on the query text field.
More information can be provided as it is needed... As this is affecting 2 different languages and 2 different frameworks and ONLY in the remote driving capacity I am starting to feel more convinced that it is an issue with the HTTP listener/handler.
Should I create a new issue or can this one be re-opened since it is not fixed?
@mikesalvia, I suggest creating a new issue and link to this issue if you don't hear back by tomorrow. I am seeing it as well @barancev and @lmtierney. Adding @AutomatedTester and @andreastt to get their thoughts. Using geckodriver 0.16, Firefox 53.0 and selenium 3.4.0.
As indicated in earlier comments it's with this step -
builder.moveToElement(element).build().perform();
Here's the stack trace I get -
org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: '5d5bd315f467', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-42-generic', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
Command duration or timeout: 60 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'testphreak-MacBook-Pro', ip: '10.1.214.164', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_92'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.1OBOghe58AHu, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, webdriver.remote.sessionid=9d3a58d5-67fe-4d39-9dc4-92a6e5de02f1, acceptInsecureCerts=false, browserVersion=53.0, platformVersion=4.4.0-42-generic, moz:processID=4515, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, platformName=linux, cssSelectorsEnabled=true}]
Session ID: 9d3a58d5-67fe-4d39-9dc4-92a6e5de02f1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:39)
at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:50)
at com.axiom.turbo.webdriver.pages.broker.SomePage.hoverContent(SomePage.java:365)
Reopening but I cannot look into it right now
While the moveToElement is definitely nicer and more intuitive, here's a JavaScript approach to doing the same thing using document.createEvent as discussed here.
This approach can be used as a workaround, until the issue is fixed. Should work against all browsers.
String moveTo = "var fireEvent = arguments[0];" + "var evObj = document.createEvent('MouseEvents');" + "evObj.initEvent( 'mouseover', true, true );" + "fireEvent.dispatchEvent(evObj);";
driver.executeScript(moveTo, element);
Ok so the issue is that currently when talking to standalone, the bindings use the non-w3c commands (since standalone responds with non-w3c protocol). We rely on standalone to translate our commands from JWP to W3C. This is why something like the execute_script command works even though the endpoint is different in each implementation.
Now the issue is that in the w3c world, there is only one actions endpoint /session/:sessionId/actions (not counting the clear actions command) whereas the JWP has 6 endpoints such as /session/:sessionId/moveto. In order to support these, standalone will have to translate a post to /session/:sessionId/moveto into an action chain and send that over to /session/:sessionId/actions instead.
This has not been done yet.
I've some fixes for protocol stuff on my local clone. Notably, a pass through mode if both local and remote ends can speak the same protocol.
Just to add, the moveToElement works on Chrome. It's just on Firefox that it doesn't work right now.
Hi move to element is working on selenium 3.4.0 and geckodriver 0.16.0 and firefox 53 for me it is working fine i tested.
Yes, to be clearer, this will only affect drivers implementing the w3c endpoints (geckodriver and the w3c compliant version of IE driver which is in beta right now). Chromedriver and current IE driver will continue to work fine. Also, only in a remote sense, so using geckodriver directly it should work fine (except for javascript)
Hi Imtierney,
this issue got solved but this issue #3882 dint got solved still i am getting the same exception
@lmtierney Thank you so much for your follow-up! Please let me know if there is any assistance you may need in resolving this issue. I have some good experience with Java and while I may not be able to fix I would totally be cool with smoke testing any changes that you make! Also if there is any more feedback or logs, I am available to provide!
Thank you again for the great product!
@prasanna532 this issue is not solved yet, that's why it's still open. It won't get solved for a little while I'm afraid, there's a hefty amount of work to do in order to accomplish it
@mikesalvia I'll let the java people know. I will NOT be the one fixing it ;)
@lmtierney Excellent! I will join the IRC channels and offer my support and assistance, is there any other way to contact the "Java folks". :-)
@testphreak Unfortunately, your workaround it does not work at all (at least in chrome)
@mike123vn the JS workaround works for me on Chrome and Firefox (I wouldn't have posted here if it wasn't). I checked again to confirm. I am using Selenium v3.4.0 (Java bindings), Chromedriver v2.29, Chrome v57.0.2987.133.
@lmtierney Sorry about the duplicate issue, thanks for pointing me here. :)
For searchability: I'm having the same issue with the WebdriverIO moveToObject command.
Also: the workaround posted above does not work for hover effects, so what I did was added a hover class alongside the :hover pseudo-class in the stylesheet, and used this to trigger the hover effect:
var element = $('#user-dropdown').value;
browser.execute("arguments[0].className += ' hover'", element);
Hi All,
I just installed Selenium 3.4.0 and geckodriver 0.16.1.
But I am getting exception with Action Class
org.openqa.selenium.InvalidArgumentException: Could not find webelement key
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'AKASHG', ip: '192.168.16.9', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\akash.g\AppData\Local\Temp\rust_mozprofile.XJWWw2bYurQX, rotatable=false, timeouts={implicit=0.0, pageLoad=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=53.0, platformVersion=6.1, moz:processID=1208.0, browserName=firefox, javascriptEnabled=true, platformName=windows_nt}]
Session ID: b0e31908-ef01-48f2-ba38-5d53374e18e5
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
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.RemoteWebDriver.perform(RemoteWebDriver.java:703)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:631)
at com.ezdi.library.Common_Lib.scroll_Page(Common_Lib.java:124)
at com.ezdi.testscripts.NewLandingPage.caseSummaryEventsForCoder(NewLandingPage.java:2985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Can anyone know about this issue?
@akashg-ezdi same issue here.
A new issue should probably be raised.
The problem occurs when Actions.moveToElement is given an element loaded by PageFactory (annotated with @FindBy).
E.g.:
@FindBy(id = "myid")
WebElement el;
public void method() {
new Actions(driver)
.moveToElement(element)
.perform();
}
This works fine:
.moveToElement(driver.findElement(By.id("myid")))
Firefox 53.0.3
geckodriver 0.17.0
Selenium 3.4.0
@alb-i986 your solution didn't work for me. But, the mouseMoveTo with element parameter is working fine with the combination of Firefox 53.0, geckodriver 0.17.0 and Selenium 3.4.0 on mac. But the same combination is not working on a grid with a windows node. Please see below the stacktrace for the same.
org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'IP-0A4D0E8D', ip: '10.77.14.141', os.name: 'Windows Server 2
012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(Abstr
actHttpCommandCodec.java:220)
at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(Abstr
actHttpCommandCodec.java:118)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExe
cutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(Driv
erCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.ja
va:637)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteM
ethod.java:35)
at org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)
at org.openqa.selenium.support.events.internal.EventFiringMouse.mouseMov
e(EventFiringMouse.java:58)
at org.openqa.selenium.remote.server.handler.interactions.MouseMoveToLoc
ation.call(MouseMoveToLocation.java:59)
at org.openqa.selenium.remote.server.handler.interactions.MouseMoveToLoc
ation.call(MouseMoveToLocation.java:32)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession
.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
16:10:30.727 WARN - Exception: mouseMoveTo
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'IP-0A4D0E8D', ip: '10.77.14.141', os.name: 'Windows Server 2
012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
Not sure if that is an issue with the geckodriver or selenium on windows or with the remote webdriver.
Any timelines on a possible fix? I'll also try the alternative approach suggested by @testphreak
Alternate approach as suggested by @testphreak works, but is flaky as it does not consistently work in all the situations. Our pages are animation intensive as well.
also seeing UnsupportedOperationError: sendKeysToActiveElement alongside with UnsupportedOperationError: mouseMoveTo, not sure if it's related.
Some more info:
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
same issue here:
UnsupportedOperationError: mouseMoveTo
protractor: 5.1.2
selenium-server-standalone: 3.4.0
geckodriver: v0.17.0
firefox: 54.0
os: osx
Likewise, sendKeysToActiveElement and mouseMoveTo are not W3C WebDriver action primitives, so the Selenium project needs to add shims for these as well.
Hello, how does it look with releasing this fix? Or is planned new release in short time? Can I get somewhere information about releases due date? Thanks for answer. I was looking in web but I didn't find any information.
@Drimix20 this may have been fixed with "Grid will make use of W3C capabilities in preference to the JSON Wire Protocol ones."
in v3.5.0 -> https://github.com/SeleniumHQ/selenium/blob/master/java/CHANGELOG
@dannyfinks @Drimix20 keep in mind the changelog has been updated but we haven't released yet. It will be soon
Thanks for answers to all of you. @lmtierney can I find somewhere written due date of planned releases? Or can I find out somehow something like roadmap?
@Drimix20 No such planning or roadmaps exist. This project is all volunteer based so releases happen when people have enough free time from their normal day jobs to get everything satisfactory for a release.
Should be fixed in version 3.5, please reopen the issue if it's not true.
Anyone have Maven Dependency of Selenium 3.5?
@akashg-ezdi I would like to but selenium 3.5 is not in maven repository. I can't use it.
FYI: version 3.5.1 is available in maven central
Hi All!
@barancev For me it is still not working on remotewebdriver. I use c#, selenium in version 3.5.2 and geckodriver 0.18 and when run on selenium grid I get this exception:
System.NotImplementedException occurred
HResult=0x80004001
Message=mouseMoveTo
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'
System info: host: '-', ip: '-', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_144'
Driver info: driver.version: RemoteWebDriver
Does not work for me (FF46, WIN64, Selenium standalone 3.6, geckodriver 0.19.0):
const {Builder, By, Key, until} = require('selenium-webdriver');
let driver = new Builder()
.forBrowser('firefox')
.usingServer('http://localhost:4444/wd/hub')
.build();
driver.get('https://www.w3schools.com/html/html5_draganddrop.asp');
var source = driver.findElement(By.id('drag1'));
var destination = driver.findElement(By.id('div2'));
driver.actions().dragAndDrop(source, destination).perform();
driver.sleep(5000);
driver.quit();
I have an error:
UnsupportedOperationError: mouseMoveTo
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'MSTW', ip: '192.168.1.50', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_131'
Driver info: driver.version: unknown
at WebDriverError (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\error.js:27:5)
at UnsupportedOperationError (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\error.js:343:5)
at Object.checkLegacyResponse (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: mouseMove
at thenableWebDriverProxy.schedule (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at actions.map.action (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\actions.js:124:23)
at Array.map (native)
at C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\actions.js:123:29
at TaskQueue.execute_ (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\promise.js:2927:27)
at C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\promise.js:668:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: ActionSequence.perform
at ActionSequence.perform (C:\solutions\Playground\SeleniumWebdriver\node_modules\selenium-webdriver\lib\actions.js:122:33)
at Object.<anonymous> (C:\solutions\Playground\SeleniumWebdriver\index.js:11:36)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
What I noticed was that the issue is resolved unless the element is not in view. In my particular example the element I performed the mouseMoveTo was further down the page and the driver must not be scrolling into view of the element. Seems like a separate bug that I'll open outside the scope of this.
For me, this appears to be related to the version of firefox.
It runs on firefox version 46 & 47, with geckodriver 0.19.0 and selenium v3.6.0
Fails on any FF version greater than 47.
(Tried and windows 10 and 7 using browserstack)
Failing on 57.0.2 (64-bit) - Quantum
using protractor: Failed: POST /session/3e293322-19e4-436f-ad96-c22e541c7d28/moveto did not match a known command
geckodriver-v0.19.1.zip
looks like sel issue https://github.com/SeleniumHQ/selenium/issues/4564
failing on window 7 and osx for FF57
works on FF47 like @lynseyp said
Please don鈥檛 hijack old issues that are unrelated to your own.
Most helpful comment
I've some fixes for protocol stuff on my local clone. Notably, a pass through mode if both local and remote ends can speak the same protocol.