1. Download the Python installation.
https://www.python.org/downloads/release/python-351/
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "height=" 325 "style=" Background:url ("/e/u261/ Lang/zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;" width= "775" alt= "Spacer.gif"/>
Depending on your operating system 32/64 bits, select the appropriate version.
The installation process I do not need to describe, my installation directory is: C:\Python35
2. Enter the "python" Command under CMD (Windows command Prompt).
(If you are prompted that Python is not an internal or external command!) Don't worry, just configure the environment variable.)
Modify My Computer, properties, advanced-environment variable--the path in the system variable is: Variable name: PATH Variable value:; C:\Python35; C:\Python35\Scripts;
|
3, installation Selenium
3.1. Install via PIP
c:\users\fnngj>python3-m pip Install Selenium
3.2. Install by download package
or download the Selenium package directly:
Https://pypi.python.org/pypi/selenium
unzip, cmd into directory selenium under the path of setup.py
> Python setup.py Install
4. Run the PIN this report error "Selenium.common.exceptions.WebDriverException:Message: ' geckodriver ' executable needs to is in PATH. ”
to download the Geckodriver and put it under the Firefox installation path and configure path, restart the script to run OK.
Python+selenium Automation Environment Construction