Python+selenium Automation Environment Construction

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.