MoveMouseAction在Microsoft WebDriver中不起作用(对于Edge浏览器)

时间:2015-09-02 13:51:09

标签: selenium selenium-webdriver microsoft-edge

尝试使用Microsoft Webdriver使用Edge浏览器运行测试时,

MoveToElement操作方法无效。

代码段:

new Actions(driver).moveToElement(driver.findElement(By.linkText("menu"))).perform();

在异常情况下观察:

  

org.openqa.selenium.UnsupportedCommandException:收到未知命令   命令持续时间或超时:10毫秒   构建信息:版本:' 2.47.1',修订版:'未知',时间:' 2015-07-30 11:02:44'   系统信息:主持人:' DESKTOP-R1AE8BA',ip:' 10.40.14.9',os.name:' Windows 8.1',os.arch:& #39; amd64',os.version:' 6.3',java.version:' 1.8.0_51'   驱动程序信息:org.openqa.selenium.edge.EdgeDriver   功能[{acceptSslCerts = true,browserVersion = 20.10240.16384.0,platformVersion = 10,browserName = MicrosoftEdge,takesScreenshot = true,pageLoadStrategy = normal,takesElementScreenshot = true,platformName = windows,platform = ANY}]   会议ID:BC49145A-C839-49D7-890C-D06A13E904D8       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)       在org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)       在org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)       在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)       在org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)       在org.openqa.selenium.remote.RemoteMouse.mouseMove(RemoteMouse.java:89)       在org.openqa.selenium.interactions.MoveMouseAction.perform(MoveMouseAction.java:39)       在org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:50)       在org.openqa.selenium.interactions.Actions.perform(Actions.java:371)

根据Microsoft博客,所有功能尚未实施,List of commands implemented in EdgeFull list of commands

有没有其他方法可以执行鼠标操作?

1 个答案:

答案 0 :(得分:1)

moveTo尚未实施,还有其他方法,例如“提交”

有关WebDriver实施状态的更多详细信息,请访问:https://dev.modern.ie/platform/status/webdriver/details/