1. Install Python
: https://www.python.org/downloads/after download, click Install, check the installation: Add Python x.x to PATH, added to the environment variable, convenient for subsequent use;
Post-Installation verification: After installation, you can open the CMD command line tool, enter: Python--version, the installation will print out the version of Python installed
2, install selenium Webdriver
command line input directly: Pip install Selenium, without environment variables, you need to install the Python directory to open the Command line tool execution
3, download Chromedriver.exe to the Google Chrome installation directory, while adding the Google Browser installation directory to the environment variable, restart the computer
4, more than three steps to complete the environment after the construction has been successful, a new Python file inspection environment is completed.
From selenium import webdriverdr = Webdriver. Chrome ()
A successful build will automatically open Google Chrome
This article is from the "13220933" blog, please be sure to keep this source http://13230933.blog.51cto.com/13220933/1957825
Python+selenium Environment Construction