简体   繁体   English

WebDriverException:无法在selenium python脚本中加载配置文件错误

[英]WebDriverException:can't load profile error in selenium python script

I am using selenium webdriver in python to drive Firefox automaticly, the python script is exported from the selenium IDE add-on in Firefox. 我在python中使用selenium webdriver自动驱动Firefox,python脚本从Firefox中的selenium IDE插件导出。 But when I run the script it raise error: 但是当我运行脚本时会引发错误:

        ======================================================================
    ERROR: test_selenium (__main__.SeleniumTest)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "selenium_test.py", line 8, in setUp
        self.driver = webdriver.Firefox()
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 46, in __init__

        self.binary, timeout),
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 46,
    in __init__
        self.binary.launch_browser(self.profile)
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 44, in lau
    nch_browser
        self._wait_until_connectable()
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 87, in _wa
    it_until_connectable
        raise WebDriverException("Can't load the profile. Profile Dir : %s" % self.profile.path)
    WebDriverException: Can't load the profile. Profile Dir : c:\users\ataosky\appdata\local\temp\tmpwpz
    zrv

    ----------------------------------------------------------------------
    Ran 1 test in 67.876s

    FAILED (errors=1)

WebDriverException: Can't load the profile. WebDriverException:无法加载配置文件。 Profile Dir : c:\\users\\ataosky\\appdata\\local\\temp\\tmpwpz 个人资料目录:c:\\ users \\ ataosky \\ appdata \\ local \\ temp \\ tmpwpz

Have anybody encountered this problem? 有人遇到过这个问题吗? How to solve this? 怎么解决这个? Thanks in advance. 提前致谢。

EDIE :selenium 2.5 version has solve this problem. EDIE :selenium 2.5版本已经解决了这个问题。

I had this issue after upgrading to Firefox 8, when running selenium v 2.9.0. 升级到Firefox 8后运行selenium v​​ 2.9.0时出现此问题。

It was fixed by upgrading to the latest version of selenium (2.13). 通过升级到最新版本的selenium (2.13)来解决这个问题。

 sudo pip install selenium --upgrade

(if you're using the Python flavour) (如果您使用的是Python风格)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 selenium.common.exceptions.WebDriverException:消息:无法加载配置文件 - selenium.common.exceptions.WebDriverException: Message: Can't load the profile python selenium webdriver问题(selenium.common.exceptions.WebDriverException:消息:“无法加载配置文件。配置文件目录:) - python selenium webdriver issue ( selenium.common.exceptions.WebDriverException: Message: "Can't load the profile. Profile Dir: ) selenium.common.exceptions.WebDriverException:消息:“无法加载配置文件。配置文件目录: - selenium.common.exceptions.WebDriverException: Message: "Can't load the profile. Profile Dir: Selenium Webdriver错误:“无法加载配置文件” - Selenium Webdriver error: “Can't load the profile” WebDriverException:消息:无法加载配置文件。 不知道发生了什么 - WebDriverException: Message: Can't load the profile. At a loss as to what is happening Python:Selenium Firefox Webdriver失败并显示错误:'无法加载配置文件... WARN addons.xpi ...“ - Python: Selenium Firefox Webdriver failing with error: 'Can't load the profile…WARN addons.xpi…" Python3.5 和 FF48 使用 Selenium WebDriver 出现“无法加载配置文件”错误 - "Can't load the profile" error occured with Selenium WebDriver by Python3.5 and FF48 WebDriverException:消息:无法加载配置文件。 可能的 Firefox 版本不匹配。 对于 Firefox 48+ 和 Selenium,您必须使用 GeckoDriver - WebDriverException: Message: Can't load the profile. Possible firefox version mismatch. You must use GeckoDriver instead for Firefox 48+with Selenium Selenium WebDriver无法加载配置文件 - Selenium WebDriver can't load profile Selenium:FirefoxProfile 异常无法加载配置文件 - Selenium: FirefoxProfile exception Can't load the profile
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM