Chrome automatically upgraded, what should I do if it cannot find the latest version of webdriver?

Chrome automatically upgraded, what should I do if it cannot find the latest version of webdriver?

background

I used Selenium to develop Facebook and Linkedin crawlers. There are some new requirements that need to be adjusted. When I started selenium today, I got an error. The error was as follows: , which means selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version xxx Current browser version is xxx with binary paththat the version of Webdriver is incompatible with the version of Chrome browser, so I checked the download of chrome webdirver online. Address, the download address shared in most technology blogs is: https://chromedriver.storage.googleapis.com/index.html, but I saw that the local chrome version is 116, and the latest webdriver version in this URL It’s 114, what should I do?

Solution

I remembered the powerful chatgpt, so I asked chatgpt a question. I didn’t expect that it really knew the solution. It responded to me with another URL. Here is its complete reply:

You can obtain a specific version of Chrome WebDriver from the official Chrome driver website or other trusted repositories.

Here are some commonly used resources:

Chrome Driver Official Website: You can visit the Chrome Developer Page to find the Chrome WebDriver download link that is compatible with a specific Chrome version. You can find the Chrome driver official website at https://sites.google.com/a/chromium.org/chromedriver/downloads↗.

Third-party WebDriver repositories: Some third-party repositories also provide different versions of Chrome WebDriver for download. For example, you can try the Selenium official website (https://www.selenium.dev/ ↗) or the Selenium project page on GitHub (https://github.com/SeleniumHQ/selenium ↗).

In these resources, you can find the version of Chrome WebDriver that matches the version of Chrome you want and download the corresponding WebDriver installation file.

Please note, make sure to download WebDriver from a trusted source and verify its integrity to ensure security and reliability.

Open https://sites.google.com/a/chromium.org/chromedriver/downloads. You can see a line of prompts above:
Insert image description here
Yes, a new version but it may not be mature enough. A stable webdriver version can be found here, click on the link https ://googlechromelabs.github.io/chrome-for-testing/ You can see the download link for the latest 116 version of webdriver, as shown below: Just
Insert image description here
find the version that suits you and download it, and the problem is solved! ! !

Guess you like

Origin blog.csdn.net/one_and_only4711/article/details/132619022