Python webdriver environment to build

1. Prepare the installation package

1. Download pythone

2. Download setuptools

3. Download pip

2. Windows environment installation

1. Install pythone, it is recommended to select python2.7.5 version.

2. Install setuptools, find the setup.py file after decompression, and enter. Via the windoes command prompt (start-run-cmd)

Find the directory where setuptools is installed and enter: python setup.py install

Note: Set environment variables, variable name: PATH, variable value: ;c\python

3. Install pip, find the pip directory and enter: python setup.py install

Go to the pythone directory and enter: easy_install pip

4. Install selenium, enter under Scripts in the pythone directory: pip install -U selenium

3. Install the browser driver

1. Installation address: https://code.google.com/p/selenium/downloads/list

2. Put the browser driver in the directory where python is installed

Through the above steps, you are done, sorry for any omissions.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324839837&siteId=291194637