Selenium+python automated installation of the environment

Source: Internet
Author: User

First, Python Installation

1. operating system:Win7 system

2. Download The Python installation package, choose 2.7 version and 3.6 version can be ( preferably installed 2.7 version stable ) Official website: https://www.python.org/

3.Python installation, double-click Fool installation

4. installation directory in the D Drive:D:\python

Second, environment variables

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

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

Third, installation Selenium (online installation)

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 )

installation Selenium and related rewinding tools (offline installation)

also open the CMD Control Panel to unpack the offline package and place it in the python installation root, install the setuptools Toolkit After installing the other toolkit To See if the python installation root directory exists Scripts folder after installing Setuptools. Other kits can be installed in the presence of

Installation Commands , all kits are installed in this manner.

Iv. Verification Selenium

How can I know Selenium is it 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 intend to use the firefox Browser, then do not install version (incompatible)

2. If you plan to use Ie or Chrome Browser, you need to download the browser driver, put the driver file into python root directory.

Selenium+python automated installation of the environment

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.