Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Selenium和FireFox\geckodriver_Python_Selenium - Fatal编程技术网

Python Selenium和FireFox\geckodriver

Python Selenium和FireFox\geckodriver,python,selenium,Python,Selenium,我目前正在尝试在新机器上使用selenium,遇到以下问题和错误: 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 我已经读了下面这篇关于这个的帖子,我似乎无法让它发挥作用 我只是在使用一

我目前正在尝试在新机器上使用selenium,遇到以下问题和错误:

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
我已经读了下面这篇关于这个的帖子,我似乎无法让它发挥作用

我只是在使用一个简单的测试:

from selenium import webdriver
browser = webdriver.Firefox()
browser.get('https://google.com')
我正在使用:

Firefox 51.0.1版(32位)

我已经试用了selenium版本2.53.6和3.0.2

我尝试下载Geckodriver并添加到系统中 可变路径

有人能告诉我我做错了什么吗。我应该使用旧版本的selenium,还是驱动程序有问题


这里的任何帮助都会很好。

刚刚遇到了同样的问题

下面是我如何解决的

  • 卸载Selenium
  • 使用
    pip Install selenium重新安装
  • 使用自制软件安装Geckodriver:
    brew安装Geckodriver
  • 将hombrew install Geckodriver路径附加到驱动程序实例化中:
    driver=webdriver.Firefox(可执行文件路径='/usr/local/bin/Geckodriver')

  • 希望这有帮助

    只是有同样的问题

    下面是我如何解决的

  • 卸载Selenium
  • 使用
    pip Install selenium重新安装
  • 使用自制软件安装Geckodriver:
    brew安装Geckodriver
  • 将hombrew install Geckodriver路径附加到驱动程序实例化中:
    driver=webdriver.Firefox(可执行文件路径='/usr/local/bin/Geckodriver')

  • 希望这有帮助

    sudo cp/usr/local/cell/geckodriver/0.16.1/bin/geckodriver/usr/bin/成功了。不需要通知你的路径。好东西!sudo cp/usr/local/cell/geckodriver/0.16.1/bin/geckodriver/usr/bin/成功了。不需要通知你的路径。好东西!会让它旋转。