The chromedriver installation is successful, the operation reports an error, and the solution

1. View the version number of Google Chrome

2. Download the corresponding chromedriver version (download is similar to the browser version number)

2.1. Download path:

ChromeDriver - WebDriver for Chrome - Downloads

 

2.2. Choose to download the file with the corresponding version number

The browser version number is 108, here you can choose ChromeDriver version 107 or 108;

2.3. Select the file corresponding to the system;

 

2.4. After the download is complete, configure:

Move the file to the /usr/local/bin/ directory:

Execute in the terminal: sudo mv Downloads/chromedriver /usr/local/bin /

You will be prompted to enter the computer password for verification  ;

2.5. Whether the verification is successful:

3. Error reporting:

3.1. Prompt "The chrome driver cannot be opened because the developer cannot be verified"

Solution: Execute the command line in the directory /usr/local/bin/: sudo xattr -d com.apple.quarantine chromedriver to make the computer trust the program

3.2. If the following error is reported when executing the script:

Solution: Add the position parameter of chrome driver, and then execute it without error

 

 

Guess you like

Origin blog.csdn.net/weixin_44701654/article/details/128123015