Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions are not implemented #233

Closed
hemanthsridhar opened this issue Sep 18, 2016 · 25 comments
Closed

Actions are not implemented #233

hemanthsridhar opened this issue Sep 18, 2016 · 25 comments

Comments

@hemanthsridhar
Copy link

hemanthsridhar commented Sep 18, 2016

Context click method of Actions class is not working in geckodriver. The same code is working fine in ChromeDriver & IEDriver.

  • OS : ANY
  • Language : Java
  • Browser Version : 48.0,2
  • Driver Version : latest(0.10.0)

Code :

        Actions action = new Actions(driver);
         String colrow="//tr["+rownumber+"]/td["+headerindex.get(colName)+"]";            
     action.contextClick(driver.findElement(By.xpath(colrow))).build().perform();

PFB for the exception caught.

org.openqa.selenium.UnsupportedCommandException: POST /session/d25239f1-b41a-4142-b1e9-eafc1ddddf71/moveto did not match a known command (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2 milliseconds
Build info: version: 'unknown', revision: '31c43c8', time: '2016-08-02 21:57:56 -0700'
System info: host: 'BlaBlaBla', ip: '192.168.2.6', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_73'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, appBuildId=20160823121617, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, browserVersion=48.0.2, platformVersion=6.3, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=Firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=Windows_NT, device=desktop}]
Session ID: d25239f1-b41a-4142-b1e9-eafc1ddddf71
    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.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:683)
    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.internal.MouseAction.moveToLocation(MouseAction.java:59)
    at org.openqa.selenium.interactions.ContextClickAction.perform(ContextClickAction.java:40)
    at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:50)
    at org.etna.utils.TestUtility.rightCickOnCell(TestUtility.java:198)
    at org.etna.customer.pageobjects.quickorder.QuickOrderPageObjects.rightClickOnASpecificCell(QuickOrderPageObjects.java:348)
    at org.etna.modules.QuickOrderPadModuleTest.speedEntryCellExtension(QuickOrderPadModuleTest.java:461)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
    at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:197)
    at org.etna.maincontroller.MainController.run(MainController.java:209)
    at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:641)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:822)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1130)
    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:782)
    at org.testng.TestRunner.run(TestRunner.java:632)
    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:1244)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    at org.testng.TestNG.run(TestNG.java:1064)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:113)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:206)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:177)

@hemanthsridhar hemanthsridhar changed the title Context click of actions class is not working Context click of Actions class is not working Sep 18, 2016
@andreastt
Copy link
Contributor

geckodriver does not yet implement actions. The actions we will implement are those being defined right now in the W3C WebDriver standard and not those of Selenium.

Selenium has said they will provide a Selenium-to-W3C-WebDriver shim for actions, but this may take some time to produce after we have made our implementation. Implementation in geckodriver/Marionette has not yet started.

@andreastt andreastt changed the title Context click of Actions class is not working Actions are not implemented Sep 21, 2016
@mucsi96
Copy link

mucsi96 commented Sep 24, 2016

Is it possible to simulate mouse actions using some JavaScript executions until Actions are implemented?

@andreastt
Copy link
Contributor

As actions by definition are expected to issue trusted events there’s no JS equivalent, unless you want to construct DOMEvents manually and dispatch those.

@AlexanderArendar
Copy link

Just would like to ask to increase priority of this implementation. Without support for Actions it is not possible to test a lot of things, like on-mouse-over popups, etc.
At least would be great to know when approximately this is planned to be implemented.

@jgraham
Copy link
Member

jgraham commented Oct 24, 2016

This is being worked on currently. However it is a large part of the spec that reaches quite deep into the browser internals to function correctly. Therefore it will take a while to make a robust implementation.

Please note that further comments indicating that it's an important feature are unnecessary. We understand that this is something many tests depend on, and it is being treated with a priority commensurate to that.

@andreastt
Copy link
Contributor

andreastt commented Oct 25, 2016

For the record, the tracking bug for Marionette is https://bugzilla.mozilla.org/show_bug.cgi?id=1292178.

@altus34
Copy link

altus34 commented Nov 25, 2016

Are you interested in a test suite for this ?

@joshroe
Copy link

joshroe commented Feb 9, 2017

Thanks for working on this. Is there an ETA for when this issue might be fixed?

@andreastt
Copy link
Contributor

No.

@ghost
Copy link

ghost commented Mar 29, 2017

Is there a nightly build with a partial fix in for this?

@andreastt
Copy link
Contributor

@sirk1989 Yes, the bleeding edge Selenium bindings and Firefox Nightly has nearly complete, but rather untested, support for the actions API defined in the WebDriver standard.

(Which I need to stress is not the same as the one in Selenium, but which should be interoperable if your language binding has a decent shim.)

@prabhurohith
Copy link

@andreastt
I tried with latest version of firefox and gecko driver but still contextClick doesn't seem to be working.
FF Version : 52.0
GeckoDriver version : 0.15
can you help me further on this please, as in the bug stated above all the dependent issues seem to be fixed.
https://bugzilla.mozilla.org/show_bug.cgi?id=1292178

@jgraham
Copy link
Member

jgraham commented Apr 3, 2017

It might be that your client isn't sending W3C-standard actions yet. If you provide a trace-level log that should be easy to diagnose.

@prabhurohith
Copy link

prabhurohith commented Apr 3, 2017

The below is the exception I am getting while building actions

org.openqa.selenium.InvalidArgumentException: Could not find webelement key
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'LT0028264', ip: '10.65.52.49', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\Rohith\AppData\Local\Temp\rust_mozprofile.1CNXA5gl0ryC, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0.2, platformVersion=6.1, moz:processID=5188, browserName=firefox, platformName=windows_nt}]
Session ID: 41a3460c-4fc9-48df-a797-dd6742852b4b
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:133)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:99)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:43)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
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.RemoteWebDriver.perform(RemoteWebDriver.java:670)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:634)
at com.rjil.cloud.tejweb.pages.AllFilesPage.rightClickCreateFolder(AllFilesPage.java:4067)
at com.rjil.cloud.teststej.testScripts.Sanity_SuiteTest.testTEJ_1456(Sanity_SuiteTest.java:101)
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:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)

@andreastt
Copy link
Contributor

@prabhurohith That’s a stack, not the trace-level log. See the README for how to enable trace-level logging.

@prabhurohith
Copy link

Anyone able to do context click with latest gecko driver on firefox latest version??
Please share the config details

@andreastt
Copy link
Contributor

Please don’t use this issue for support. It’s here to track implementation of actions in Marionette and geckodriver.

With regards to right-clicks in the context of context menus, since you cannot interact with browser UI elements in WebDriver, that’s not possible.

@mpulipati
Copy link

I tried with Selenium 3.4.0 , Gecko Driver 16.0 and Firefox 53.0 . Still actions class is not working for me.
While trying to perform actions.moveToElement(element).perform(), I am seeing below exception.

1493669702804 geckodriver INFO Listening on 127.0.0.1:39944
1493669703843 geckodriver::marionette INFO Starting browser \?\C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
1493669705617 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/FileUtils.jsm :: FileUtils_getDir :: line 70" daJavaScript error: resource://gre/modules/AddonManager.jsm, line 1657: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized
ta: no] Stack trace: FileUtils_getDir()@resource://gre/modules/FileUtils.jsm:70 < FileUtils_getFile()@resource://gre/modules/FileUtils.jsm:42 < validateBlocklist()@resource://gre/modules/AddonManager.jsm:671 < startup()@resource://gre/modules/AddonManager.jsm:834 < startup()@resource://gre/modules/AddonManager.jsm:3129 < observe()@resource://gre/components/addonManager.js:65
1493669712625 Marionette INFO Listening on port 63405
JavaScript error: resource://gre/modules/AddonManager.jsm, line 2570: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized
1493669712937 Marionette WARN TLS certificate errors will be ignored for this session
May 01, 2017 4:15:13 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
1493669713886 geckodriver INFO Listening on 127.0.0.1:44726
1493669714505 geckodriver::marionette INFO Starting browser \?\C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
1493669715148 addons.manager DEBUG Application has been upgraded
1493669715149 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/FileUtils.jsm :: FileUtils_getDir :: line 70" data: no] Stack trace: FileUtils_getDir()@resource://gre/modules/FileUtils.jsm:70 < FileUtils_getFile()@resource://gre/modules/FileUtils.jsm:42 < validateBlocklist()@resource://gre/modules/AddonManager.jsm:671 < startup()@resource://gre/modules/AddonManager.jsm:834 < startup()@resource://gre/modules/AddonManager.jsm:3129 < observe()@resource://gre/components/addonManager.js:65
1493669715152 addons.manager DEBUG Completed startup sequence
JavaScript error: resource://gre/modules/AddonManager.jsm, line 1657: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
1493669719869 Marionette INFO Listening on port 63435
JavaScript error: resource://gre/modules/AddonManager.jsm, line 2570: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized
May 01, 2017 4:15:20 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

org.openqa.selenium.InvalidArgumentException: Could not find webelement key
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'HDQBEPC261224', ip: '10.253.145.213', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\mpuli365\AppData\Local\Temp\rust_mozprofile.Ny2RDqt9uupa, 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=19208.0, browserName=firefox, javascriptEnabled=true, platformName=windows_nt}]
Session ID: 2d7b2406-0763-4976-8427-49a59bed3b9b
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:422)
org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
org.openqa.selenium.remote.RemoteWebDriver.perform(RemoteWebDriver.java:703)
org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:631)
org.openqa.selenium.interactions.Actions.perform(Actions.java:593)
hpp.publishbuild.automation.superhelper.MAF.moveFocus(MAF.java:2306)
hpp.publishbuild.automation.pages.Home.HomePO.selectSubMenuItem(HomePO.java:106)
hpp.publishbuild.automation.pages.Home.HomePO.selectRateOfferList(HomePO.java:137)
hpp.publishbuild.automation.scripts.RatePlan.RatePlan.addAccomodationType(RatePlan.java:61)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
org.testng.TestRunner.privateRun(TestRunner.java:773)
org.testng.TestRunner.run(TestRunner.java:623)
org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
org.testng.SuiteRunner.run(SuiteRunner.java:259)
org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
org.testng.TestNG.run(TestNG.java:1018)
hpp.publishbuild.automation.superhelper.TestNGRunner.run(TestNGRunner.java:48)
java.lang.Thread.run(Thread.java:745)

@AutomatedTester
Copy link
Contributor

Closing this as it is implemented and has been for some time. THere are a few follow ups documented in this bug.

@mpulipati please raise a selenium bug for that issue.

@amyreit
Copy link

amyreit commented May 16, 2017

I have been searching - did anyone open a new issue - I still get the org.openqa.selenium.UnsupportedCommandException: 2017-05-16-10:28:13:675 mouseMoveTo
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'

using Firefox 53, selenium 3.4 and gecko 16.1

@prabhurohith
Copy link

prabhurohith commented May 16, 2017 via email

@navinjd
Copy link

navinjd commented May 19, 2017

It didn't work for me as well. I have tried with firefox 52, 53, 53.0.2, 54.0b8, GeckoDriver version 16 and 16.1 with selenium 3.4.0.

Error Message:

org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
System.NotImplementedException: 'mouseMoveTo

I am using Windows 8.1, C#.

Below is the code which throws the exception.

Actions builder = new Actions(Driver);
builder.DragAndDrop(source, destination).Build().Perform();

Why is that its working for Rohith(comment above) but not me?

@AutomatedTester
Copy link
Contributor

@navinjd The issue you are hitting is SeleniumHQ/selenium#3808. If you aren't using Grid then the issue is in the C# bindings and you need to raise a separate Selenium issue

@AutomatedTester
Copy link
Contributor

@amyreit The issue you are hitting is SeleniumHQ/selenium#3808. If you aren't using Grid then the issue is in the client bindings and you need to raise a separate Selenium issue

@AutomatedTester
Copy link
Contributor

Locking issue to prevent me too comments

@mozilla mozilla locked and limited conversation to collaborators May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests