This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17961|Reply: 2

Selenium web automated testing scheme

[Copy link]
Posted on 8/28/2017 1:55:39 PM | | |
Selenium doesn't make it easy to understand what it is like QTP? It's a favorite among programmers, but it's a big barrier for newcomers to testing.

What is Selenium?
What is Selenium RC?
What is Webdriver?
What is the relationship between RC and Webdriver?
What is the relationship between Webdriver and programming languages?
Can Selenium execute scripts in parallel?

Here the insect master tells you in a simple way that their intricate relationship is complicated. Straighten out the relationship between them to really use it.


What is Selenium?

Selenium is a web automation testing toolset that includes IDE, Grid, RC (selenium 1.0), WebDriver (selenium 2.0), etc.
Selenium IDE is a plugin for the firefox browser. Provide simple script recording, editing, and playback functions.
Selenium Grid is used to distribute the test footsteps. It is now integrated into Selenium Server.
RC and WebDriver should be seen more as a set of specifications that define the protocols for client footsteps to interact with the browser. and the interface for element positioning and manipulation.

What is WebDriver?
It is not easy for students who are new to selenium automated testing to understand what API is and how it relates to programming languages.

http://www.w3.org/TR/2013/WD-webdriver-20130117/

When I first learned Selenium (WebDriver), it took me a week to translate this document, but I didn't understand what it was. In fact, it is a basic protocol specification.
For example, the Webdriver API says that we need to provide a method for locating page element IDs.


How does Webdriver organize and execute use cases?

    Sorry, webdriver won't.

Organizing the methods (use cases) for manipulating these page elements and entering the test results is done by the unit testing framework of the programming language. For example, Java's Junit and TestNG unit testing frameworks, Python's UnitTest unit testing framework, etc.



What is the relationship between Selenium RC and WebDriver?

RC and WebDriver are similar in that they can be seen as a set of specifications for operating web pages. Of course, they work differently.

selenium RC runs the Javascrip{filter}t application in the browser, using the browser's built-in Javascrip{filter}t translator to translate and execute selenese commands (selenese is a collection of selenium commands).

WebDriver controls the browser directly through native browser support or browser extensions. WebDriver is developed for individual browsers and replaces Javascrip{filtering}t embedded in the web application under test. Tight integration with browsers allows for the creation of more advanced tests, avoiding the limitations caused by the Javascrip{filtering}t security model. In addition to support from browser vendors, WebDriver also uses OS-level calls to simulate user input.

It looks like webdriver is a bit better. In order to maintain compatibility, RC and webdriver coexist in selenium 2.0, but selenium 2.0 generally refers to webdriver.



The difference between parallel and distributed

Some students are curious about how to execute test cases in parallel, and parallelism requires multiple use cases to be executed "at the same time", which is also realized by the multi-threading technology of programming languages.

Isn't Selenium Grid capable of distributed execution, you ask? The concept of distribution is to write a use case that can be executed on different platforms, such as a test case on computer A, you can call the Firefox browser of computer B (linux) to run the test case on computer A; You can also call the Chrome browser on computer C (windows) to run the test case on computer A. This is the concept of distribution.





Previous:C# WebBrowser control insertion executes JS code
Next:The browser debugs the JS compressed code
Posted on 10/2/2017 9:19:59 AM |
I can't understand the point
Posted on 10/10/2021 10:08:53 PM |
The point is that it is possible to simulate the control of web page elements, for crawlers...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com