小编joh*_*ohn的帖子

selenium.common.exceptions.WebDriverException:消息:无法连接到服务 /usr/bin/safaridriver

基本上,在我的 Mac 上,selenium 不起作用。我的代码是这样的:

from selenium import webdriver
webdriver.Safari('/usr/bin/safaridriver')

Run Code Online (Sandbox Code Playgroud)

这实际上是最基本的 selenium 脚本,但它不起作用......我的程序运行 30 秒后,我收到此错误:selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service /usr/bin/safaridriver。我不知道为什么会发生这种情况...我的 safari 版本是最新的(14.0.1),但我不断收到此错误。谢谢你的帮助!

python safari macos selenium selenium-webdriver

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

标签 统计

macos ×1

python ×1

safari ×1

selenium ×1

selenium-webdriver ×1