Opening: Recently there are students in learning selenium, using Firefox has a problem, want to try Chrome, and its use of crome encountered a variety of problems ... The following articles are available for reference to people who encounter this problem
The whole article: How to solve it? Refer to the following:
Introduction to the basic environment:
python3.5 + selenium2.48 (or above) +chrome( version 65.0.3325.181 64-bit ), where Chrome has been updated to the latest version by April 2018 ...
Download Chromedriver.exe
The Chromedriver.exe file is a drive file that calls Chrome, so the version of the file must be compatible with the version of Chrome
Chromedriver.exe as follows:http://chromedriver.storage.googleapis.com/index.html
There are many versions of Chromedriver.exe, the version shown for Chrome ( version 65.0.3325.181) (2.37)
Click 2.37 in the version.
3. Place the downloaded chromedriver.exe (2.37) on (copy or move) to Chrome's installation directory (the general Chrome installation path is as follows,C:\Program Files (x86) \google\chrome \application)
4. Set the system environment variable to add the path of chrome to the path (as in the steps).
5. Open the IDE (such as Pycharm) to write the code, and test it with the following code:
6. Run the 5th step of the code, it is very likely to error, given a similar to Chromedriver.exe ..... path and other words of the wrong message .... How to solve it?
Close all open chrome browsers and run again.
If you close the Chrome browser, not yet, will also give an error, then restart the computer, it should be OK
7. Follow the 6th step of the solution, you can call chrome by selenium ....
Concluding remarks: So far, you are done ..., hope to help you oh
How Python+selenium and Chrome fit together