Python+selenium environment building
1. Install python
Download address: https://www.python.org/downloads/ download and click install. Check: Add Python X.X to PATH during installation to add to the environment variable for subsequent use.
Verification after installation: after the installation is complete, you can open the cmd command line tool and enter: python-- version. The installed python version will be printed after the installation is successful.
2. Install selenium webdriver
Enter the command line directly: pip install selenium. If you don't add an environment variable, you need to install the python directory and open the command line tool to execute.
3. Download chromedriver.exe to the Google browser installation directory, and add the Google browser installation directory to the environment variable to restart the computer.
4. After the completion of the above three steps, the environment is built successfully. Create a new python file to check whether the environment has been built.
From selenium import webdriverdr = webdriver.Chrome ()
If the construction is successful, Google browser will be opened automatically.