1. Install Python
https://www.python.org/
2, install setuptools(Python's basic Package tool)
:https://pypi.python.org/pypi/setuptools
Download ez_setup.py file
Open cmd, go to the directory where the ez_setup.py file is stored, execute the python ez_setup.py
3. Install pip(Python's installation package management tool)
:https://pypi.python.org/pypi/pip, download pip-6.1.1.tar.gz
CMD into the file directory after decompression, execute Python setup.py install
4, installation Selenium
CMD into the scripts directory, execute pip install-u Selenium
C:\Python27\Scripts > Pip install-u Selenium
5. Demo
Installation is complete, you can try to write a small demo
From selenium import Webdriver
From selenium.common.exceptions import nosuchelementexception
From Selenium.webdriver.common.keys import keys
Browser = Webdriver. Firefox () # Get local session of Firefox
Browser.get ("http://www.baidu.com") # Load page
Browser.close ()
If you want to use IE, Chrom browser, also need to download the corresponding webdriver (download files Chromedriver.exe and IEDriverServer.exe)
Build Python+selenium Environment under Windows