Automated Testing (Selenium+python)-Environment building

Source: Internet
Author: User

One, Python installation (Win7 64-bit system)

1. Download the Python installation package, select both version 2.7 and version 3.6 to

Official website: https://www.python.org/

2.Python installation, double-click the Fool installation to D-plate (recommended not installed on the C-drive)

Second, environment variables

1. After the installation is complete, look at this directory D:\python\Scripts, there is no pip.exe and easy_install.exe (usually have)

2. Add D:\python and D:\python\Scripts to the environment variable path

Third, installation Selenium

1. Open cmd Window input: Pip (indicates normal if content is displayed)

2.cmd Input Command installation Selenium:pip Install-u Selenium

(Note: Be sure to see progress 100% complete, if it fails halfway, re-enter the instructions to install until you see 100% complete)

Iv. Verification of Selenium

How do you know selenium is properly installed?

1. Make sure the Firefox browser is installed on your computer

2.cmd window Enter the following command

>python

>from Selenium Import Webdriver

>webdriver. Firefox ()

3. If you can start the browser, the environment installation OK.

V. Browser

1. If you plan to use Firefox browser, do not install version 47 (incompatible)

2. If you plan to use IE or chrome, you will need to download the browser driver to place the driver files in the Python root directory.

Automated Testing (Selenium+python)-Environment building

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.