selenium It's a web Automated testing tools for , Many students who study automatic learning function begin to choose selenium , Compared to it QTP There's a lot, a little bit :
free , There's no need to crack it any more QTP And it's a big headache
small , For different languages, it's just a package , and QTP Need to download and install 1 More than a G The program .
This is also the most important point , No matter how familiar you used to be C、 java、ruby、python、 Or both C# , You can go through selenium Complete automated testing , and QTP Only support VBS
Support for multiple platforms :windows、linux、MAC , Support for multiple browsers :ie、ff、safari、opera、chrome
Support the execution of distributed test cases , Test cases can be distributed to different test machines for execution , It is equivalent to the function of distributor .
Today's text is to teach you to build selenium + python Automated test environment .
Build a platform windows
The preparation tools are as follows :
download python, You can go to the latest official website to download .
www.python.org/
You must make sure that the version you download is 64 A still 32 Bit . And you need to download installer
Install by yourself after downloading . Then enter cmd, In the play python. If a pile of python Version information , That means the installation is successful .
2.1pip install
C:\Users\aaa>python3 -m pip install selenium
2.2 Install via download package
Or download it directly selenium package :
pypi.python.org/pypi/seleni…
decompression ,cmd Entry directory :
C:\selenium\selenium2.53.5> python3 setup.py install
Download decompression , You'll get one chromedriver.exe file
ChromeDriver yes google Automated test interface for web developers , It is selenium2 and chrome browser A bridge for communication .selenium Through a set of agreements (JsonWireProtocol :github.com/SeleniumHQ/… ChromeDriver communicate ,selenium In essence, it is the underlying encapsulation of the protocol , Also provide external WebDriver The upper layer calls the class library .
Here you need to pay attention to your Google browser and chromedriver The version correspondence of needs to match , Then it will call the failed .
You can download your own version .
Finally, thank everyone who reads my article carefully , Watching the rise and attention of fans all the way , Reciprocity is always necessary , Although it's not very valuable , If you can use it, you can take it
These materials , For doing 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful ……