问题
Getting following error in selenium tests
POST /session/ee1b9201-dadc-7446-b753-0a418a230d30/moveto did not match a known command
What i've done is
Actions resetView = new Actions(driver);
resetView.moveToElement(el).perform();
Environment:
Firefox v47.0
Webdriver 3.0.0-beta2
回答1:
This is entirely expected. No releases of GeckoDriver (Marionette) support the Actions
class. It is one of the top priorities of Mozilla's team developing Marionette.
回答2:
There is an issue that Selenium tracks, that is blocked by the Marionette issue.
Since the issue it's over 3 weeks old, and looking at their commit log, I wouldn't hold my breath for a patch anytime soon.
If you can use Firefox 47.0.1, because in Firefox 47.0 they had another bug, you can use the old WebDriver API that works (not Marionette). From 48 it stopped working, because you're supposed to use Marionette. Yes, that Marionette that is not finished.
If you must test on Firefox, I recommend you should stick to Firefox 47.0.1, Selenium 2.latest, eventually throw them in a docker image, and run like that.
That's what I do at least for Germanium, until it will hopefully eventually work also for Marionette.
来源:https://stackoverflow.com/questions/39104732/selenium-web-driver-movetoelement-actions-throwing-error-with-marionette-drive