【问题标题】:selenium.common.exceptions.WebDriverException: Message: Can't load the profileselenium.common.exceptions.WebDriverException:消息:无法加载配置文件
【发布时间】:2016-06-22 10:38:16
【问题描述】:

我正在使用 selenium 和 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、selenium 2.52

PS:昨天它运行良好,我没有做任何更改,今天它崩溃了

有什么想法吗?

【问题讨论】:

标签: python firefox selenium centos webdriver


【解决方案1】:

问题是 127.0.0.1 在服务器的防火墙中被阻止。 我不知道它是如何被阻止的,但是当我从防火墙中删除它时,它起作用了

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 2013-12-29
      • 2013-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-27
      • 1970-01-01
      • 2016-09-19
      相关资源
      最近更新 更多