- Learn Selenium
- Unmesh Gundecha Carl Cocchiaro
- 234字
- 2021-06-24 13:25:30
Selenium WebDriver
Selenium WebDriver is the successor of Selenium RC (Remote Control), which has been officially deprecated. Selenium WebDriver accepts commands using the JSON-Wire protocol (also called Client API) and sends them to a browser launched by the specific driver class (such as ChromeDriver, FirefoxDriver, or IEDriver). This is implemented through a browser-specific browser driver. It works with the following sequence:
- The driver listens to the commands from Selenium
- It converts these commands into the browser's native API
- The driver takes the result of native commands and sends the result back to Selenium:
We can use Selenium WebDriver to do the following:
- Create robust, browser-based regression automation
- Scale and distribute scripts across many browsers and platforms
- Create scripts in your favourite programming language
Selenium WebDriver offers a collection of language-specific bindings (client libraries) to drive a browser. WebDriver comes with a better set of APIs that meet the expectations of most developers by being similar to object-oriented programming in its implementation. WebDriver is being actively developed over a period of time, and you can see many advanced interactions with the web as well as mobile applications.
The Selenium Client API is a language-specific Selenium library that provides a consistent Selenium API in programming languages such as Java, C#, Python, Ruby, and JavaScript. These languages bindings let tests to launch a WebDriver session and communicate with the browser or Selenium Server.