【发布时间】:2017-10-07 18:21:40
【问题描述】:
我一直在努力弄清楚为什么我在尝试使用 selenium 时总是出错。我在我工作的公司的 /home/user unix 驱动器上使用本地安装的 anaconda3。我已经 pip 安装了 selenium,看似没有问题,但是当我尝试以下操作时:
from selenium import webdriver
driver = webdriver.Firefox()
它失败并显示以下消息:
WebDriverException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
我尝试下载最新的 chromedriver 并尝试使用它,我尝试安装另一个 gecko-driver,我尝试了各种方法。但没有任何工作。我很乐意提供任何额外的信息,我只是想在某个时候开始做这件事......
谢谢!
【问题讨论】:
-
firefox安装在哪个路径上?
-
这只是我公司安装的任何东西,位于我的 C: 驱动器上。
标签: python selenium webdriver selenium-chromedriver geckodriver