Selenium Web 驱动程序 moveToElement (Actions) 使用 marionette 驱动程序抛出错误?

Selenium web driver moveToElement (Actions) throwing error with marionette driver?

在 selenium 测试中出现以下错误

POST /session/ee1b9201-dadc-7446-b753-0a418a230d30/moveto did not match a known command 

我所做的是

Actions resetView = new Actions(driver);
resetView.moveToElement(el).perform();

环境:

Firefox v47.0

Webdriver 3.0.0-beta2

这完全在意料之中。没有 GeckoDriver (Marionette) 版本支持 Actions class。它是 Mozilla 团队开发 Marionette 的首要任务之一。

有一个issue that Selenium tracks, that is blocked by the Marionette issue

因为这个问题已经超过 3 周了,看着他们的 commit log,我不会很快屏住呼吸等待补丁。

如果您可以使用 Firefox 47.0.1,because in Firefox 47.0 they had another bug,您可以使用旧的 WebDriver API(不是 Marionette)。从 48 开始它停止工作,因为你应该使用 Marionette。是的,那个Marionette没说完

如果您必须在 Firefox 上进行测试,我建议您坚持使用 Firefox 47.0.1、Selenium 2.latest,最终将它们放入 docker图像,和 运行 那样。

这就是我至少为 Germanium 所做的,直到它最终也有望对 Marionette 起作用。