Home >>Selenium Tutorial >Selenium WebDriver
Selenium WebDriver is a key component of the Selenium Tool Suite. The latest release "Selenium 2.0" is integrated with WebDriver API providing a simpler and more concise interface for programming.
The image below will give you a good understanding of the Selenium components and the Test Automation Tools.
Selenium WebDriver was implemented as a feature of Selenium v2.0. The original Selenium i.e. Selenium v1 variant consisted of just IDE, RC and Grid. With the release of Selenium v3, however, RC was deprecated and moved to a legacy package.
Test scripts can be created in WebDriver using any of the programming languages available, and can be executed directly in most modern web browsers. WebDriver-supported languages include C #, Java , Perl, PHP, Python , and Ruby.
Until studying the Selenium WebDriver principles, you will be well versed in some of the programming languages that are supported. Selenium Web driver is currently the most popular driver among Java and C #. We use Selenium with java for that tutorial.
Selenium WebDriver is much quicker than Selenium RC, as it allows direct calls to the web browsers. RC on the other hand needs an RC server for browser interaction.
WebDriver has built in Firefox driver (Gecko Driver) implementation. For other browsers, to communicate and run the test, you must plug in their browser-specific drivers. Most frequently used WebDriver include:
Selenium WebDriver API enables simplified communication between languages and browsers.
The image below displays the WebDriver selenium architectural illustration.
There are four basic components of WebDriver Architecture:
To help growing languages, selenium developers have developed language bindings/Selenium Server Libraries. If you choose to use the application driver in java for example, use the java bindings. All language bundles that are enabled can be downloaded from the official Selenium website (https://www.seleniumhq.org/download/#client-drivers).
JSON (JavaScript Object Notation) is an open standard for web-based data exchange. It supports structures in the data such as object and array. So, JSON data is easy to write and read.
JSON Wire Protocol offers a method for data transfer between a server and a client. JSON Wire Protocol serves as an industry standard for various REST network services
Selenium uses drivers, unique to each browser, to establish a secure user link without exposing the internal logic of browser features. The application driver is also unique to programming language such as Java , C # etc.
When we execute a test script using WebDriver, the following operations are performed internally.
Browsers supported by Selenium WebDriver:
Some among Selenium WebDriver's most significant features are:
WebDriver also allows testers to use dynamic finders to address complex types of web elements such as checkboxes, drop-downs and alerts.