Selenium+python Environment Construction

Source: Internet
Author: User

1. First visit http://www.python.org/download/ to download python, I use the version is 2.7

2. When installing, be careful to add Python to the environment variable path in the installation option

3. After the installation is complete, test if the Python installation is successful, cmd open command line Input python command, if that is successful

4. Download and install the Setuptools version of Windows "This tool is the basic package tool for Python"

Go to this address http://pypi.python.org/pypi/setuptools/0.6c11 download setuptools corresponds to Python under 2.7 version-setuptools-0.6c11.win32-py2.7

5. Go to http://pypi.python.org/pypi/pip download Pip tool and unzip the downloaded pip-7.1.2.tar.gz to any folder

6. Open cmd, go to folder like C:\Python27\scripts, enter Easy_install pip

7. Install selenium, go to https://pypi.python.org/pypi/selenium#downloads download selenium-2.47.3.tar.gz, then unzip to C:\Python27\Lib\ Site-packages

8. Using Selenium

1) go to http://selenium-release.storage.googleapis.com/index.html?path=2.47/download server side Selenium-server-standalone-2.47.1.jar

2) go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html to download and install the JDK

3) Configure Environment variables

Java_home = C:\Program files\java\jdk1.8.0_60

Path =%java_home%\bin;%java_home%\jre\bin;

CLASSPATH =.; %java_home%\lib;%java_home%\lib\tools.jar

Run cmd input java-version if configured successfully

4) Use Java-jar Selenium-server-standalone-x.xx.x.jar to open selenium RC

If it does not open, check to see if the port is occupied. Netstat-aon|findstr 4444 "

9. To http://selenium-release.storage.googleapis.com/index.html?path=2.47/download IE driver, after decompression will exe placed in the Python directory, you can support IE

Selenium+python 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.