selenium之鼠标事件

1、鼠标悬停
火狐版本51,selenium版本3
ActionChains(driver).move_to_element(above).perform()
执行代码时,报错:selenium.common.exceptions.WebDriverException: Message: POST /session/e64653d2-498d-426a-9731-da64933e46c1/moveto did not match a known command

这是Mozilla/geckodriver的一个bug,由于geckodriver开发是2016年中旬的,所以只能这对firefox47或者更老的版本使用,如果你要使用selenium3+firefox,请使用较老版本的firefox。或者你可以尝试考虑selenium3+chrome。
原文地址:https://www.cnblogs.com/yuanyajiao/p/6476888.html