我正在将硒与python一起使用进行一些自动化测试
我的代码一直运行到今天早上,当我运行它时,它给了我这个例外
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.
我正在使用CentOS 6.7版(最终版),Firefox 38.6.0,硒2.52
PS:昨天工作正常,我没有做任何更改,今天崩溃了
有任何想法吗 ?
最佳答案
我找到了解决方法。
出现问题是因为FF扩展的兼容性检查花费了30秒以上。
安装FF扩展“禁用附加组件兼容性检查”将跳过此步骤,一切正常。