tutuzhuzhutu
tutuzhuzhutu
2017-06-09 07:13

python+selenium悬停总报错

  • python
  • selenium
chain = ActionChains(browser)
movetest = browser.find_element_by_xpath("/html/body/div[1]/div[1]/div[1]/div[1]/span")

chain.move_to_element(movetest).w3c_actions.perform()
time.sleep(3)
browser.find_element_by_class_name("page-change").click()
time.sleep(3)


      File "C:/Users/Administrator/PycharmProjects/untitled1/test.py", line 57, in loginCheck
chain.move_to_element(movetest).perform()

File "C:\Python27\lib\site-packages\selenium\webdriver\common\action_chains.py", line 77, in perform
self.w3c_actions.perform()
File "C:\Python27\lib\site-packages\selenium\webdriver\common\actions\action_builder.py", line 76, in perform
self.driver.execute(Command.W3C_ACTIONS, enc)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 256, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: POST /session/ba5d3c0b-4d39-4c11-b7fa-48b744ee0c79/actions did not match a known command

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答