Selenium Automated Testing--Learning summary-webdriver

Source: Internet
Author: User

Recently is looking at the ping++ Test team authored the "Selenium Automation Test Road", very very good book, not only the introduction of tools, but also a very valuable practice summary, their own company is also doing automation, because it is based on B/s, to take into account the hardware environment, and the main use of robotframework to build automated scripts to verify the reliability of the system.

Before myself also learned about selenium knowledge, but the total feeling of knowledge is very fragmented, I searched the internet for a long time, bought this book, found himself still lack a lot, very fortunate to read this book, below began a little bit of building their own knowledge framework.

First, the principle of work

Selenium Webdriver is the native interface of the calling browser (the browser-native API is the interface built into the browser design, in addition to the native interface and the browser-generic or a browser-compatible interface

) to manipulate the browser. Selenium 2.0 encapsulates the browser's native API into the Webdriver API, creates Webdriver objects in the script, and calls the Webdriver API through the object to access the browser interface, directly manipulating the elements in the browser page, Even operate the browser itself (screenshots, window size, start, close, install plugins, configure certificates, etc.), so just like the real user in action.

Using Selenium webdriver in a test script, regardless of the browser, the processing logic is sent through a comandexecutor command, which is actually a message sent to the Web Service (Web service is based on a specific webdriver The restful interface of the wire protocol, the test script notifies the browser to do an HTTP request that contains messages to the HTTP request body of the Web service.

The code for the Selenium Httpcommandexecutor class maintains a nametourl = Immutablemap.<string,commandinfo>builder () function, It translates simple commands into corresponding request URLs, requests based on SessionID, and does not conflict and interfere when multithreading is parallel.

Second, the Environment building (based on Java) (version No conflict can be, note 32-bit or 64-bit)

1.JDK

2.eclipse

3. Browser chromestable_54.0.2840.99.exe (no direct link, fq search), Firefox,ie,

4. Browser driver, consistent with browser version

5. Test environment (a website)

6.Selenium Tool Jar Pack Selenium-server-standalone-2.53.0.jar

7. Code Management Tools Apache-maven

8.mavend of local warehouse. m2

Selenium Automated Testing--Learning summary-webdriver

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.