【求助】:move_to_element报错Message: performActions
selenium吧
全部回复
仅看楼主
level 2
2011的骑士 楼主
代码:
from selenium.webdriver.common.action_chains import ActionChains
from selenium import webdriver
import time
driver = webdriver.Firefox()
driver.get("https://www.baidu.com/")
driver.implicitly_wait(10)
right_click=driver.find_element_by_xpath(".//*[@id='u1']/a[6]")
ActionChains(driver).move_to_element(right_click).perform()
报错:
Traceback (most recent call last):
File "C:\Windows\System32\seleniumtest\mouse.py", line 15, in <module>
actions.perform()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\selenium\webdriver\common\action_chains.py", line 77, in perform
self.w3c_actions.perform()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\selenium\webdriver\common\actions\action_builder.py", line 76, in perform
self.driver.execute(Command.W3C_ACTIONS, enc)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: performActions
2017年05月24日 10点05分 1
level 1
楼主解决了吗
2017年06月29日 09点06分 2
求解决方法
2017年09月04日 12点09分
level 1
楼主如何解决的
2017年09月04日 13点09分 3
level 1
Firefox浏览器版本问题,47以上版本会出现这个问题,建议换成chrome或者降低版本吧
2019年05月06日 08点05分 4
1