Automated Test python----Selenium test environment setup

Source: Internet
Author: User

Automated test Use python The flexibility is strong, and the language is easy to start, for the test engineer is very suitable for a language, the current mainstream is also python to write a script implementation Web , interface and other test automation.

Oneself in the field of automation after a lot of groping and practice, accumulated some experience, later slowly in the blog for everyone to share.

Here's how to prepare for the test environment:

First, download the installation Pyhon and Setuptools (now py It 's basically used . 3.0 , of course, one of them is still in use. 2.7 version)

Download website python Address: https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz

Download: Setuptools (Link yourself Baidu a bit, there are many.) My Baidu network disk generation link has been prompted error, can not give the installation package.

Second, installation

1 , direct Operation python To execute the file, set the environment variable after the step installation is complete:

Right-click My Computer ------ Properties -------- Advanced system Settings ----- Environment Variables ---------- Set PATH The path to the installation directory python Path and python/scripts add a path to the PATH Next.

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/91/74/wKiom1j2DPiDjyGqAAbAzK3bwfs830.png-wh_500x0-wm_ 3-wmp_4-s_3543756039.png "style=" Float:none; "title=" Sets environment variables. png "alt=" wkiom1j2dpidjygqaabazk3bwfs830.png-wh_50 "/ >



mine is installed in C under Disk:

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/91/73/wKioL1j2DSTicqRGAABpVB3PlDU673.png-wh_500x0-wm_ 3-wmp_4-s_172077115.png "title=" C-disk directory. png "alt=" wkiol1j2dsticqrgaabpvb3pldu673.png-wh_50 "/>

My add-on is like this:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/91/74/wKiom1j2DTTzR80PAAA0F1pKh40068.png-wh_500x0-wm_ 3-wmp_4-s_435174805.png "title=" my environment variable. png "alt=" wkiom1j2dttzr80paaa0f1pkh40068.png-wh_50 "/>


2 , and then you can run cmd- input python To see if the installation was successful:

A release note appears that the installation was successful.

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/91/73/wKioL1j2DUPyp9RyAABIWks3_Cg729.png-wh_500x0-wm_ 3-wmp_4-s_2637081708.png "title=" Python installation succeeded. png "alt=" wkiol1j2dupyp9ryaabiwks3_cg729.png-wh_50 "/>

Ok , Get here python The installation was successful. But to do the selenium test, you also need to install setuptools(to install other plug-in modules),

directly run the line of sight download a good installation package, follow the prompts to install successfully. Environment variable has been set before (setuptools installation will

python/scripts path below)

Third, plug-in installation

can now be directly in cmd--- Enter the required modules for the instruction installation separately:

Easy_install Django

Easy_install NumPy

Easy_installpip (this is used to install other plug-in modules, such as Selenium module)

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/91/74/wKiom1j2DVbg5lHwAABO8m3QQrs034.png-wh_500x0-wm_ 3-wmp_4-s_3635315692.png "title=" pack Pip.png "alt=" Wkiom1j2dvbg5lhwaabo8m3qqrs034.png-wh_50 "/>

installation Selenium Module

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/91/74/wKiom1j2DWvgceBZAAAPyFEMzco574.png-wh_500x0-wm_ 3-wmp_4-s_3793219149.png "title=" pack Selenium.png "alt=" Wkiom1j2dwvgcebzaaapyfemzco574.png-wh_50 "/>

Well, it's for Web of automated testing Selenium The environment is set up and the follow-up will continue to be updated.


This article from the "It Bug" blog, declined reprint!

Automated Test python----Selenium 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.