美文网首页
selenium.common.exceptions.WebDr

selenium.common.exceptions.WebDr

作者: 生命不止运动不息 | 来源:发表于2024-01-14 17:27 被阅读0次

python使用selenium的webdriver调用safari浏览器时, 错误如下

selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
截屏2024-01-15 17.23.39.png

解决办法

1、先执行enable开启命令

sudo safaridriver --enable

2、然后执行以下命令,会提示没有权限,不用理会,再执行一次。会卡住,等一会终止。然后就可以调起浏览器了

sudo safaridriver -p 0

参考文章

https://stackoverflow.com/questions/46554285/unable-to-open-a-safari-browser-using-selenium-webdriver-with-python-can-any-on
https://www.jianshu.com/p/f971b9a35333

相关文章

网友评论

      本文标题:selenium.common.exceptions.WebDr

      本文链接:https://www.haomeiwen.com/subject/xflcodtx.html