zoukankan      html  css  js  c++  java
  • ActionChains报错问题总结

    在使用Python2.7+Selenium3.0.2+Firefox50.1时,鼠标事件ActionChains运行总是报错,报错信息如下:

    C:Python36python3.exe C:/Users/root/PycharmProjects/untitled3/test170117.py
    Traceback (most recent call last):
      File "C:/Users/root/PycharmProjects/untitled3/test170117.py", line 458, in <module>
        ActionChains(driver).move_to_element(set).perform()
      File "C:Python36libsite-packagesseleniumwebdrivercommonaction_chains.py", line 74, in perform
        action()
      File "C:Python36libsite-packagesseleniumwebdrivercommonaction_chains.py", line 225, in <lambda>
        Command.MOVE_TO, {'element': to_element.id}))
      File "C:Python36libsite-packagesseleniumwebdriver emotewebdriver.py", line 236, in execute
        self.error_handler.check_response(response)
      File "C:Python36libsite-packagesseleniumwebdriver emoteerrorhandler.py", line 192, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: POST /session/3ba988a1-5c6f-4999-8815-71d40e62a6af/moveto did not match a known command
     
    经过搜索,说是geckodriver和Firefox有Bug,最后将Selenium3.0.2换成Selenium2.53.0(此时环境为Python2.7+Selenium2.53.0+Firefox50.1),此时运行python脚本时,报错:
    报错信息忘了截图了?????
    搜索后,说是因为Selenium支持Firefox及其以下版本,所以最后环境变为:Python2.7+Selenium2.53.0+Firefox46,问题解决,ActionChains()类下的各种鼠标操作方法完美运行。
    github上该Bug相关信息:
    https://github.com/SeleniumHQ/selenium/issues/2285
    https://github.com/mozilla/geckodriver/issues/159
  • 相关阅读:
    巨人的崛起 Android操作系统发展历程
    iPhone 4S定位功能加强 支持GLONASS系统
    android子线程更新UI,与主Thread一起工作
    什么在阻碍移动互联网的普及?
    WEB.CONFIG 配置详解
    解决在aspx页面上进行传中文参数时会出现乱码问题
    VS2005水晶报表注册码
    windows2003应用程序池假死的问题
    浅谈ASP.NET内部机制
    合理建立数据库索引
  • 原文地址:https://www.cnblogs.com/csjd/p/6337946.html
Copyright © 2011-2022 走看看