First, Python Installation
1. operating system:Win7 system
2. Download The Python installation package, choose 2.7 version and 3.6 version can be ( preferably installed 2.7 version stable ) Official website: https://www.python.org/
3.Python installation, double-click Fool installation
4. installation directory in the D Drive:D:\python
Second, environment variables
1. after the installation is complete, look at this directory D:\python\Scripts, there are no pip.exe and easy_install.exe These two files (usually have)
2. Add the D:\python and D:\python\Scripts paths to the environment variable path
Third, installation Selenium (online installation)
1. Open cmd window input:pip ( indicates normal if content is displayed )
2.cmd Input Command installation Selenium:pip install-u Selenium
( Note: Be sure to see progress 100% Complete, if it fails halfway, re-enter the instructions to install until you see 100% complete )
installation Selenium and related rewinding tools (offline installation)
also open the CMD Control Panel to unpack the offline package and place it in the python installation root, install the setuptools Toolkit After installing the other toolkit To See if the python installation root directory exists Scripts folder after installing Setuptools. Other kits can be installed in the presence of
Installation Commands , all kits are installed in this manner.
Iv. Verification Selenium
How can I know Selenium is it properly installed?
1. Make sure the firefox browser is installed on your computer
2.cmd Window Enter the following command
>python
>from Selenium Import Webdriver
>webdriver. Firefox ()
3. If you can start the browser, the environment installation OK.
V. Browser
1. If you intend to use the firefox Browser, then do not install version (incompatible)
2. If you plan to use Ie or Chrome Browser, you need to download the browser driver, put the driver file into python root directory.
Selenium+python automated installation of the environment