Google Chrome和ChromeDriver版本号不一致问题解决
1 (base) kaka@KakadeMBP bin % /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version 2 Google Chrome 116.0.5845.96 3 (base) kaka@KakadeMBP bin % chromedriver --version 4 ChromeDriver 114.0.5735.16 (7e1ff058633f5b79b1cd7479aca585ba385519d8-refs/branch-heads/5735@{#182}) 5 (base) kaka@KakadeMBP selenium_cainiao % which chromedriver 6 /usr/local/bin/chromedriver
现在是Google Chrome
和ChromeDriver
版本号不一致,访问ChromeDriver
网址,下载最新的符合116版本号的ChromeDriver
:
ChromeDriver - WebDriver for Chrome - Version Selection (chromium.org)
点击页面画红框的位置:
跳转到:ChromeDriver - WebDriver for Chrome - Version Selection (chromium.org)
点击页面画红框的位置:
跳转到:Chrome for Testing availability
下载符合版本的chromedriver:
解压复制后:
sudo cp /Users/kaka/Downloads/chromedriver-mac-arm64/chromedriver /usr/local/bin/chromedriver
再次查看版本号:
(base) kaka@KakadeMBP chromedriver-mac-arm64 % chromedriver --version
zsh: killed chromedriver --version
可能是我下载的版本有问题,于是我就换了另一个版本下载:https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/mac-x64/chromedriver-mac-x64.zip
再重新实验:
1 (base) kaka@KakadeMBP Downloads % ls 2 (20230727) AML policy update and refresher 2023 back office - chinese.pptx cainiao_images_20230822_277116-Snipaste_2023-08-01_09-07-37.png fp2_0-8.1_app.tar 3 AppCleaner.app chromedriver-mac-arm64 vendor 4 Dockerfile chromedriver-mac-arm64.zip vendor.zip 5 VPN chromedriver-mac-x64 便签记录 6 WPS chromedriver-mac-x64.zip 测试图片 7 (base) kaka@KakadeMBP Downloads % cd chromedriver-mac-x64 8 (base) kaka@KakadeMBP chromedriver-mac-x64 % ls 9 LICENSE.chromedriver chromedriver 10 (base) kaka@KakadeMBP chromedriver-mac-x64 % sudo cp chromedriver /usr/local/bin/ 11 (base) kaka@KakadeMBP chromedriver-mac-x64 % sudo chmod +x /usr/local/bin/chromedriver 12 (base) kaka@KakadeMBP chromedriver-mac-x64 % chromedriver --version 13 ChromeDriver 116.0.5845.96 (1a391816688002153ef791ffe60d9e899a71a037-refs/branch-heads/5845@{#1382}) 14 (base) kaka@KakadeMacBook-Pro selenium_cainiao % /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version 15 Google Chrome 116.0.5845.96
这次Google Chrome
和ChromeDriver
版本号一致了。