基本上,在我的 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),但我不断收到此错误。谢谢你的帮助!