selenium icon indicating copy to clipboard operation
selenium copied to clipboard

EventFiringWebdriver : Actions UnsupportedCommandException: mouseMoveTo IE11

Open AlexanderDunn opened this issue 9 years ago • 11 comments

Meta -

OS:
Windows 7 Selenium Version:
3.5.3 Browser:
Internet Explorer

Browser Version:
11.0.9600.18762

InternetExplorerDriver version: 3.5.1.0 32 bit

Expected Behavior -

The mousePointer should move to the element as demonstrated with a plain Webdriver

Actual Behavior -

Throws org.openqa.selenium.UnsupportedCommandException: mouseMoveTo

"C:\Program Files\Java\jdk1.8.0_144\bin\java" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\lib\idea_rt.jar=59615:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\plugins\junit\lib\junit-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.4\plugins\junit\lib\junit5-rt.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\rt.jar;C:\Users\C15605A\Desktop\SeleniumActionsBugReport\out\test\classes;C:\Users\C15605A\Desktop\SeleniumActionsBugReport\out\test\resources;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-java\3.5.3\5b50d4072e0e51779b6e9f3594106312061bfde\selenium-java-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\junit\junit\4.12\2973d150c0dc1fefe998f834810d68f278ea58ec\junit-4.12.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-api\3.5.3\dc1a9dfe5d5a01f737892f42bbce2c6f31989522\selenium-api-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-chrome-driver\3.5.3\1e156413771d7ef55237525be0bac313ff430d86\selenium-chrome-driver-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-edge-driver\3.5.3\abd2b24d3785251cb725bf26bcf9a1e3aac0e443\selenium-edge-driver-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-firefox-driver\3.5.3\383b86b040affddedf2a99b4faad4225f03891dd\selenium-firefox-driver-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-ie-driver\3.5.3\9cd90cf4eaeccde076b8346642da1e8584c8002\selenium-ie-driver-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-opera-driver\3.5.3\1690747cd97c13254326a7356546a7cbbe965827\selenium-opera-driver-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-remote-driver\3.5.3\30aad304ee719ca317c461196e363e0b62163ce\selenium-remote-driver-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-safari-driver\3.5.3\ddc1cc9bbbf1781d16a4d649f0a9eb1bb34ffc79\selenium-safari-driver-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\selenium-support\3.5.3\50a7fa2ee6c79eb91374642ab3845cee0e48d032\selenium-support-3.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\cglib\cglib-nodep\3.2.4\42c972dee25a436b32c6027e848287ff47ed6750\cglib-nodep-3.2.4.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-exec\1.3\8dfb9facd0830a27b1b5f29f84593f0aeee7773b\commons-exec-1.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.5\6c6c702c89bfff3cd9e80b04d668c5e190d588c6\commons-lang3-3.5.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.10\4b95f4897fa13f2cd904aee711aeafc0c5295cd8\commons-codec-1.10.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.5\2852e6e05fbb95076fc091f6d1780f1f8fe35e0f\commons-io-2.5.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.2\4bfc12adfe4842bf07b657f0369c4cb522955686\commons-logging-1.2.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.w3c.css\sac\1.3\cdb2dcb4e22b83d6b32b93095f644c3462739e82\sac-1.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\net.sourceforge.cssparser\cssparser\0.9.23\7c704efdbde6c75b637434a89c863721f9e97187\cssparser-0.9.23.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.0\c4ba5371a29ac9b2ad6129b1d39ea38750043eff\gson-2.8.0.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\23.0\c947004bb13d18182be60077ade044099e4f26f1\guava-23.0.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest-core\1.3\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\net.sourceforge.htmlunit\htmlunit\2.27\aea70f853583b0eadcaa6a0429595973036cc745\htmlunit-2.27.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\net.sourceforge.htmlunit\htmlunit-core-js\2.27\ccdcd83d38d7134ef429dcca1b9ca75d299af2e6\htmlunit-core-js-2.27.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\net.sourceforge.htmlunit\neko-htmlunit\2.27\a1afb1fd290cc6d076639d852b80943c10ace0a2\neko-htmlunit-2.27.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.3\d1577ae15f01ef5438c5afc62162457c00a34713\httpclient-4.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.6\e3fd8ced1f52c7574af952e2e6da0df8df08eb82\httpcore-4.4.6.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpmime\4.5.3\889fd6d061bb63b99dd5c6aba35a555ae863de52\httpmime-4.5.3.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-client\9.4.5.v20170502\ca35c26110afd73d4cc164682bd0d4b0c1e057cb\jetty-client-9.4.5.v20170502.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-http\9.4.5.v20170502\c51b8a6a67d64672889249dd958edd77bff8fc0c\jetty-http-9.4.5.v20170502.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-io\9.4.5.v20170502\76086f955d4e943396b8f340fd5bae3ce4da19d9\jetty-io-9.4.5.v20170502.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-util\9.4.5.v20170502\5fd36dfcf39110b809bd9b20cec62706ab694711\jetty-util-9.4.5.v20170502.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna\4.1.0\1c12d070e602efd8021891cdd7fd18bc129372d4\jna-4.1.0.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\net.java.dev.jna\jna-platform\4.1.0\23457ad1cf75c2c16763330de5565a0e67b4bc0a\jna-platform-4.1.0.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\com.codeborne\phantomjsdriver\1.4.0\333f3289207a970c9a97308df9d5ac0880e12aa8\phantomjsdriver-1.4.0.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.seleniumhq.selenium\htmlunit-driver\2.27\4ba0e5092d6785e3ad3975701425c82060ca8a97\htmlunit-driver-2.27.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\3.1.0\3cd63d075497751784b2fa84be59432f4905bf7c\javax.servlet-api-3.1.0.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-api\9.4.5.v20170502\521348a576e0d70f4abb7813fa1743919ec0921a\websocket-api-9.4.5.v20170502.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-client\9.4.5.v20170502\5c7de9bd7d448de674267a58e91d804c65f7105a\websocket-client-9.4.5.v20170502.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty.websocket\websocket-common\9.4.5.v20170502\2a385e7b044a1832efa4cf98bc1ea326fa0804c2\websocket-common-9.4.5.v20170502.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\xalan\serializer\2.7.2\24247f3bb052ee068971393bdb83e04512bb1c3c\serializer-2.7.2.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\xalan\xalan\2.7.2\d55d3f02a56ec4c25695fe67e1334ff8c2ecea23\xalan-2.7.2.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\xerces\xercesImpl\2.11.0\9bb329db1cfc4e22462c9d6b43a8432f5850e92c\xercesImpl-2.11.0.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\xml-apis\xml-apis\1.4.01\3789d9fada2d3d458c4ba2de349d48780f381ee3\xml-apis-1.4.01.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\1.3.9\40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf\jsr305-1.3.9.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\com.google.errorprone\error_prone_annotations\2.0.18\5f65affce1684999e2f4024983835efc3504012e\error_prone_annotations-2.0.18.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\com.google.j2objc\j2objc-annotations\1.1\ed28ded51a8b1c6b112568def5f4b455e6809019\j2objc-annotations-1.1.jar;C:\Users\C15605A\.gradle\caches\modules-2\files-2.1\org.codehaus.mojo\animal-sniffer-annotations\1.14\775b7e22fb10026eed3f86e8dc556dfafe35f2d5\animal-sniffer-annotations-1.14.jar" com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 concise.reproducible.testcase.ActionsBugTest,actionsAreBugged
Started InternetExplorerDriver server (32-bit)
3.5.1.0
Listening on port 14352
Only local connections are allowed
Sep 18, 2017 1:09:25 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'W5155597', ip: '10.187.95.125', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_144'
Driver info: driver.version: RemoteWebDriver

	at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:222)
	at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:119)
	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:646)
	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.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:641)
	at concise.reproducible.testcase.ActionsBugTest.actionsAreBugged(ActionsBugTest.java:33)
	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)


Process finished with exit code -1

Steps to reproduce -

package concise.reproducible.testcase;

import org.junit.After;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerOptions;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.events.EventFiringWebDriver;

public class ActionsBugTest {
    private EventFiringWebDriver eventFiringWebDriver;
    private WebDriver driver;

    @Test
    public void actionsAreBugged() {
        System.setProperty("webdriver.ie.driver", getClass().getClassLoader().getResource("IEDriverServer.exe").getPath());
        InternetExplorerOptions IEOptions = new InternetExplorerOptions();
        IEOptions.enableNativeEvents();
        IEOptions.requireWindowFocus();
        driver = new InternetExplorerDriver(IEOptions);
        driver.get("https://github.com/SeleniumHQ/selenium");
        new Actions(driver)
                .moveToElement(driver.findElement(By.cssSelector(".select-menu .btn-primary")))
                .build()
                .perform();
        // works with WebDriver
        eventFiringWebDriver = new EventFiringWebDriver(driver);
        new Actions(eventFiringWebDriver)
                .moveToElement(eventFiringWebDriver.findElement(By.cssSelector(".select-menu .btn-primary")))
                .build()
                .perform();
        // Exception thrown for EventFiringWebDriver
    }

    @After
    public void teardown() {
        driver.quit();
    }
}

AlexanderDunn avatar Sep 18 '17 12:09 AlexanderDunn

Dublicate of #4589 The fix will be released in selenium 3.6

barancev avatar Sep 23 '17 08:09 barancev

@barancev Hi,

I've updated to 3.6.0 and using IEDriverServer.exe of version 3.6.0.0 and now move doesn't work correctly!

It always moves mouse somewhere near the element. Firefox, Chrome - ok.

Any ideas? Thank you!

P.S. I'm not using extended desktop or something, just a regular single desktop mode that worked before.

mgrybyk avatar Sep 28 '17 15:09 mgrybyk

@mgrybyk Raise a new issue and provide a reproduction case.

barancev avatar Sep 28 '17 15:09 barancev

@mgrybyk I am also running into exact same issue using IEDriverServer 3.6.0 and Selenium server 3.6.0. Did you find any workaround or is there an open-issue you could point me to?

Nikunj1703 avatar Nov 02 '17 14:11 Nikunj1703

@Nikunj1703, yes. It was my issue due to invalid implementation of wrapper around WebElement.

Strange that it worked for years in all browsers and stopped working right now, but still :)

xlenz avatar Nov 02 '17 17:11 xlenz

@xlenz thanks for your response! I spent some more time to investigate further however it looks like an issue to me. I created a ticket for it: https://github.com/SeleniumHQ/selenium/issues/5009

Nikunj1703 avatar Nov 03 '17 16:11 Nikunj1703

@Nikunj1703, can you try using IEDriver 2.53.1 binary without any code changes?

I still use 2.x binary due to critical level of instability of 3.x binaries. Like 40% of tests failing with any of 3.x binaries, while have no failures with 2.x binary. It's not only about mouse move, there are tons of issues.

Also, 2.x version is faster. It took like 4 hours for 2.x version while 3.x runs 5.5 hours. (Have 2500 complex tests, up to 1.5 hour in chrome/firefox)

Hope this helps :)

xlenz avatar Nov 03 '17 17:11 xlenz

@xlenz thanks for the detailed information about your findings. I have been using IEDriver 2.53.1 and selenium 2.x from long time but I decided to attempt a transition to 3.x I also ran into tons of issues during this migration and thought of investigating one thing at a time :) Anyways, considering these failures it looks like I should still stay with 2.x until most of the issues with 3.x are fixed and work-around is available (not much hacky). I would definitely NOT want to compromise with the speed of execution since I have to support execution of 1000s of my automation test across Chrome, FF, IE10-11, and Edge on nightly basis. Thanks for your direction! Hope to see things working out "soon".

Nikunj1703 avatar Nov 03 '17 19:11 Nikunj1703

@Nikunj1703: are there open issues for the "tons of issues" you've mentioned? We've worked hard to make the transition painless, so if you're running into problems we'd like to know what they are.

shs96c avatar Nov 03 '17 20:11 shs96c

@shs96c my apologies for bluntly mentioning "tons of issues". My transition has been painful mostly in FF and IE browsers -for which I could find open issues. I truly understand the complexity involved in the development and eagerly looking forward to migrating to 3.x Thanks for all your support 👍 :)

Nikunj1703 avatar Nov 03 '17 20:11 Nikunj1703

@shs96c, not sure about the particular issues, however, if overall stability is poor it's hard, difficult and doesn't make sense to submit lots of particular issues. So, it's easier to use version 2 rather than spend days and days to submit lots of regression issues and wait for months so they are maybe planned to be fixed..

xlenz avatar Nov 03 '17 22:11 xlenz