Before setting up the environment, please clarify a few questions
a. Which system to use
For example: the system used this time is win7_64 bit system
b. Which browser to use
For example: The browser used this time is Firefox 59_64 bit
c. The python version supported by the tool selenium
For example: because the selenium3.11.0 used this time supports python2.7 version and python3.4+ version, so this time python3.6.4_64 bit is used
d. The version of the browser supported by the browser driver
For example: the browser used this time is Firefox 59_64 bit, so use Firefox to drive the geckodriver-v0.20.1_64 bit version
Environment construction
1. Install pyhton3.6.4_64 bit
a. Download address: https://www.python.org/
Download the Windows x86-64 executable installer
b. Installation (check to add environment variables during installation)
If it is not checked, you need to add the installation path of pyhton to the system environment variable. Note that the installation path should be followed by an English; sign
2. Install pip10.0.1 (python2.7.9 or python3.4 or above already comes with pip, this step can be skipped)
a. Download address: https://pypi.python.org/pypi/pip
Download the pip-10.0.1.tar.gz file and extract it to the C drive and rename it to pip
b. Installation
Open the run, enter cmd and press Enter, use the dos command to enter the pip folder unzipped to the C drive, and enter python setup.py install to complete the installation
3. Install selenium3.11.0
a. Download address: https://www.seleniumhq.org/
Download selenium3.11.0.tar.gz file and extract it to C drive and rename it to selenium
b. Installation
Open the run, enter cmd and press Enter, use the dos command to enter the selenium folder unzipped to the C drive, and then enter python setup.py install to complete the installation
If pip is installed, just enter pip install -u selenium under dos to complete the installation.
4. Download the driver geckodriver-v0.20.1-win64.zip for Firefox 59_64 bit browser
After decompressing to the C drive, add the drive path c:/ to the environment variable, note that the English ; sign should be added after c:/
5. Install the browser Firefox 59_64 bit
6. Install the development environment pycharm (optional)
Download address: https://www.jetbrains.com/pycharm/
download pycharm 64 bit