Selenium WebDriver

Posted by jothi on September 21st, 2019

Selenium WebDriver is the most important component of the Selenium Tool Suite. The latest version "Selenium 2.0" is integrated with the WebDriver API, which provides a simpler and more concise programming interface. The following image will give you a fair understanding of Selenium components and test automation tools.

Selenium WebDriver performs much faster compared to Selenium RC because it makes direct calls to web browsers. RC, on the other hand, needs an RC server to interact with the browser.

WebDriver has a built-in implementation of the Firefox driver (Gecko Driver). For other browsers, you must connect your specific browser drivers to communicate and perform the test. The most commonly used WebDriver includes:

  • Google Chrome Driver
  • Internet Explorer Driver
  • Opera Driver
  • Safari Driver
  • HTML Drive Driver (a special headless driver)

Selenium WebDriver - Architecture

Selenium WebDriver API provides a language communication function and browsers.

Four basic components of WebDriver architecture:

  • Selenium Language Bindings
  • JSON Wire protocol
  • Browser drivers
  • Real browser

Selenium Language Bindings / Selenium Client Libraries

Software developers have created Selenium Client Libraries/language links to support multiple languages. For example, if you want to use the Java browser driver, use the Java JSON Protocol links.

JSON Wire Protocol

JSON (JavaScript Object Notation) is an open standard for web data exchange. It supports data structures such as object and matrix. Therefore, it is easy to write and read JSON data. The JSON Wire protocol provides a transport mechanism for transferring data between a server and a client. The JSON Wire protocol serves as an industry standard for many REST web services.

Browser Drivers

Browser Controllers Selenium uses browser-specific drivers to establish a secure browser connection without revealing the internal logic of browser functionality. The browser driver is also specific to the language used for automation, such as Java, C #, etc.

When we run a test script using WebDriver, the following operations are performed internally:

  • The HTTP request is generated and sent to the browser controller for each Selenium command.
  • The controller receives the HTTP request through the HTTP server.
  • The HTTP server decides. all steps to execute instructions that are executed in the browser.
  • The execution status is sent back to the HTTP server, which is then sent back to the automation script.

Browsers

Selenium WebDriver-compatible browsers:

  • Internet Explorer
  • Mozilla Firefox
  • Google Chrome
  • Safari

 Selenium Online Training | Selenium Course Certification

Like it? Share it!


jothi

About the Author

jothi
Joined: June 28th, 2019
Articles Posted: 4

More by this author