【发布时间】:2017-02-10 17:01:27
【问题描述】:
我已经完成了之前的问题,但没有发现其他人遇到我的问题。
这个简单的代码挂了
from selenium import webdriver
d = webdriver.Firefox();
浏览器启动,但它只是挂在那里。一段时间后,它崩溃了,我得到了错误
selenium.common.exceptions.WebDriverException: Message: Can't load the profile.
Profile Dir: /tmp/tmpn_MQnf If you specified a log_file in the
FirefoxBinary constructor, check it for details.
我在 Ubuntu 14.04 LTS 上有 Firefox49。我有 selenium 2.53.6 并阅读了之前的帖子,我升级到了 selenium 3.0.0.b3。我也下载了geckdriver,放到/usr/bin
看起来我仍在运行旧版本的 selenium。但是当我卸载它并安装 selenium 3.0.0.b3 时,我看到以下错误 -
selenium.common.exceptions.WebDriverException:
Message: Service geckodriver unexpectedly exited. Status code was: 2
我错过了什么?
【问题讨论】:
-
看起来我还在运行旧版本的 selenium。但是当我卸载它并安装 selenium 3.0.0.b3 时,我看到以下错误 ------------------------------- -------------------------------------------------- ----------selenium.common.exceptions.WebDriverException:消息:服务 geckodriver 意外退出。状态码是:2
-
查看 geckdriver.log 它说 -> 用法:geckodriver [OPTIONS] geckodriver:未知选项 --port
标签: python selenium firefox selenium-webdriver ubuntu-14.04