python使用selenium的webdriver調(diào)用safari瀏覽器時熏矿, 錯誤如下
selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
截屏2024-01-15 17.23.39.png
解決辦法
1已骇、先執(zhí)行enable開啟命令
sudo safaridriver --enable
2、然后執(zhí)行以下命令票编,會提示沒有權(quán)限褪储,不用理會,再執(zhí)行一次慧域。會卡住鲤竹,等一會終止。然后就可以調(diào)起瀏覽器了
sudo safaridriver -p 0
參考文章
https://stackoverflow.com/questions/46554285/unable-to-open-a-safari-browser-using-selenium-webdriver-with-python-can-any-on
http://www.reibang.com/p/f971b9a35333