Python +selenium Web Automation test Environment Setup

Source: Internet
Author: User
Tags gz file

Selenium is a web of automated testing tools, many learning function automation students began to prefer selenium, compared with QTP because it has a lot of a bit:

* Free, no need to crack QTP and big headache

* Small, for different languages it's just a package, and QTP needs to download and install 1 + G programs.

* This is also the most important point, whether you are more familiar with C, Java, Ruby, Python, or all C #, you can complete automated testing via selenium, while QTP only supports VBS

* Multi-platform support: Windows, Linux, MAC, multi-browser support: IE, FF, Safari, opera, Chrome

* Support the execution of distributed test cases, can distribute test cases to different test machine execution, equivalent to the function of the dispenser.

Build Platform Windows

The preparation tools are as follows:

-------------------------------------------------------------

Download python

http://python.org/getit/

Download Setuptools "Python's Basic Package tool"

# Http://pypi.python.org/pypi/setuptools

https://pypi.python.org/packages/2.7/s/setuptools/

Download Pip "Python's installation package management tool"

Https://pypi.python.org/pypi/pip

-------------------------------------------------------------

Because the version is updated, Pyhton select 2.7.xx, Setuptools choose the version of your platform, Pip do not worry about tar.gz as available under Windows.

Window Installation steps:

1, Python installation, this does not explain, EXE file run installation can, since you choose Python, I believe you are familiar with Python, I install directory C:\Python27

2,Setuptools installation is also very simple, the same EXE file, the default will find the Python installation path, will be installed in the C:\Python27\Lib\site-packages directory.

via the Setuptools connection provided above, drag the page to the bottom to find, setuptools-1.3.2.tar.gz file (version will be updated with time version), unzip the file, find Ez_ install.py file, enter the Windows command prompt to execute ez_install.py:

C:\setuptools-1.3>python ez_install.py No error indicates successful installation.

(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:\Python27

3, install PIP, I am the default decompression in the C:\pip-1.3.1 directory

4. Open a command prompt (start---cmd return) Enter the C:\pip-1.3.1 directory:

C:\pip-1.3.1 > python setup.py install

5, then switch to the C:\Python27\Scripts directory input:

C:\Python27\Scripts > easy_install pip

6, Installation Selenium, (: Https://pypi.python.org/pypi/selenium)

If it is connected, you can enter the command installation directly under C:\Python27\Scripts:

C:\Python27\Scripts > pip install-u Selenium

If there is no Internet connection (this is generally not possible), download Selenium 2.33.0 (currently the latest version)

and unzip the entire directory into the C:\Python27\Lib\site-packages directory.

This article is from the "Cheng Technology blog" blog, make sure to keep this source http://zhengshuheng.blog.51cto.com/1439780/1572103

Python +selenium Web Automation test Environment Setup

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.