首先查看chrome浏览器版本
在浏览器地址栏输入:chrome://version/
我是下载的最新版本131.0.6778.140。
在官方地址下载chromedriver,发现并没有我这个版本:
https://googlechromelabs.github.io/chrome-for-testing/
观察到下载的url地址,尝试将里面的版本号更改为我的浏览器版本,像这样:
https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.140/mac-arm64/chromedriver-mac-arm64.zip
就下载成功了。
经测试,可以通过selenuim打开浏览器!