Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/328.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.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 Mac OS未打开驱动程序_Python_Macos_Selenium_Automation - Fatal编程技术网

Python Mac OS未打开驱动程序

Python Mac OS未打开驱动程序,python,macos,selenium,automation,Python,Macos,Selenium,Automation,我已将此路径保存到回音路径 /Users/../proyect/drivers 但当我执行测试时,我得到一个错误: selenium.common.exceptions.WebDriverException:消息:无效参数:无法识别的功能:chromeOptions browser=webdriver.Chrome()尝试从终端使用pip更新selenium pip install -U selenium 并确保可以从路径访问chromedriver 编辑:使用selenium==3.141.

我已将此路径保存到回音路径
/Users/../proyect/drivers

但当我执行测试时,我得到一个错误:

selenium.common.exceptions.WebDriverException:消息:无效参数:无法识别的功能:chromeOptions


browser=webdriver.Chrome()

尝试从终端使用
pip
更新selenium

pip install -U selenium
并确保可以从路径访问
chromedriver


编辑:使用
selenium==3.141.0
并从IDE更新包,解决了问题。

使用可执行驱动程序文件
driver=browser怎么样。Chrome(“”)
?不起作用。它仅适用于此Firefox(可执行文件_path='/Users/../proyect/drivers/geckodriver'),但我想打开Chromewell,因为gecko驱动程序适用于Firefox,请从下载
chromedriver
,确保chrome版本与驱动程序版本同步,然后将其放在
驱动程序
文件夹中,看看是否有效。让我们回顾一下:1)selenium是最新的(3.141.0),2)直接从终端执行
chromedriver
将打开驱动程序。那么您使用的是哪种python<代码>python--版本selenium是最新的python 3.7.3。从终端执行chromedriver时,表示在端口9515上启动chromedriver 80.0.3987.106(F680695574609230CF9B635CD784CFB1BF81BB53A参考/分支头/3987@{882}),并且它不会打开任何驱动程序。导出路径=$PATH:/Users/../proyect/drivers添加到.bash\u配置文件中