selenium.common.exceptions.WebDriverException:消息:无法加载配置文件 [英] selenium.common.exceptions.WebDriverException: Message: Can't load the profile

查看:5357
本文介绍了selenium.common.exceptions.WebDriverException:消息:无法加载配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用selenium与python做一些自动化测试



我的代码是正常工作,直到今天上午,当我运行它给了这个异常



  driver = fwb.WebDriver(firefox_profile = ff_profile,firefox_binary = ff_bin)
文件/usr/lib/python2.6 /site-packages/selenium/webdriver/firefox/webdriver.py,第59行,在__init__
self.binary,超时),
文件/usr/lib/python2.6/site-packages /selenium/webdriver/firefox/extension_connection.py,第47行,在__init__
self.binary.launch_browser(self.profile)
文件/usr/lib/python2.6/site-packages/ selenium / webdriver / firefox / firefox_binary.py,第66行,在launch_browser
self._wait_until_connectable()
文件/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/ firefox_binary.py,行105,在_wait_until_connectable
raise WebDriverException(无法加载配置文件配置文件
selenium.common.exceptions.WebDriverException:消息:无法加载配置文件。配置文件目录:%s如果在FirefoxBinary构造函数中指定了log_file,请检查它以了解详细信息。

我正在使用CentOS版本6.7(Final),firefox 38.6.0,selenium 2.52

PS:YESTERDAY它工作正常,我没有做任何更改,今天它崩溃



任何想法?

解决方案

我找到了一个解决方法。
出现此问题是因为FF扩展的兼容性检查需要超过30个字符。
安装FF扩展禁用加载项兼容性检查跳过这一切,一切都很好。


I'm using selenium with python to do some automated testing

my code was working correctly until this morning, when I run it it gave me this exception

     driver = fwb.WebDriver(firefox_profile=ff_profile, firefox_binary=ff_bin)
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
    self.binary, timeout),
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
    self.binary.launch_browser(self.profile)
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 66, in launch_browser
    self._wait_until_connectable()
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 105, in _wait_until_connectable
    raise WebDriverException("Can't load the profile. Profile "
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.

I'm working on CentOS release 6.7 (Final), firefox 38.6.0, selenium 2.52

PS: YESTERDAY it was working perfectly, I didn't do any changes, today it crashes

any ideas ?

解决方案

I found a workaround. The problem appears because the compatibility check for FF extensions takes more than 30 secounds. Installing the FF extension "Disable Add-on Compatibility Checks" skips this and everything is fine.

这篇关于selenium.common.exceptions.WebDriverException:消息:无法加载配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆