小编lau*_*ond的帖子

如何修复WebDriverException:在我们连接之前,浏览器似乎已经退出了?

在我的Linux系统中,我使用Firefox,执行我的程序,我的错误是:

Traceback (most recent call last):

File "shenma_diff_main_v2.py", line 90, in <module>
    browser = webdriver.Firefox(profile)
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
    self.binary, timeout),
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
    self.binary.launch_browser(self.profile)
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 66, in launch_browser
    self._wait_until_connectable()
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 100, in _wait_until_connectable
    raise WebDriverException("The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
Run Code Online (Sandbox Code Playgroud)

如果我使用root执行我的程序就可以了.

python selenium python-2.7

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

python ×1

python-2.7 ×1

selenium ×1