我在使用 Actions
类的驱动时遇到了问题。我有这段代码:
Actions act= new Actions(d1);
act.moveToElement(d1.findElement(By.xpath("path of the element")).build().perform();
之前我使用 Selenium-Java 2.43.0
时,这个命令可以正常工作。但是我升级到了 3.0.0-beta2
,开始通过 gecko driver 访问 firefox driver
。
在上述命令中,我的测试失败了。我收到了以下异常:
org.openqa.selenium.UnsupportedCommandException: POST /session/21dfc828-a382-4622-8c61-89bc48e29744/moveto 未匹配到已知命令(警告:服务器未提供任何堆栈跟踪信息) 命令执行时间或超时:4毫秒
请帮忙解决问题。