×

Selenium WebDriver Tutorial

Seleniun WebDriver Introduction

  • Selenium WebDriver is the essential tool of Selenium Tool Suite because it can directly communicate the browser without any server. 
  • Selenium WebDriver is a browser automation framework that accepts commands and sends them to the browser.  
  • It was developed by JSON Huggins and Simon Stewart from Google Company in 2008.
  • Web driver is implemented through a browser-specific driver. 
  • Selenium WebDriver comes under Selenium version 2, which provides a simple and brief programming interface. 
  • Selenium2= WebDriver+ Selenium 1.0, where selenium 1.0 version includes Selenium IDE, Selenium RC and Selenium Grid.
  • WebDriver is a collection of core java libraries and interfaces.
  • The Selenium WebDriver test scripts can be developed by any supported programming languages and can be run directly in web browsers.
  • The programming languages that are supported by WebDriver include C#, Java, Perl, PHP, Python, and Ruby.
Web driver Introduction

WebDriver execution is faster as compared to Selenium RC because selenium RC needs a selenium server to interact with the browser whereas WebDriver directly interacts with the web browser without any need of selenium server.

Before going further to the concepts of Selenium WebDriver, we should know any supported programming languages. Presently, Selenium WebDriver is in demand with Java and C#.

Here, we are performing a Selenium WebDriver with the java programming language.

To learn basic and advanced concepts of java and C# programming language, you can refer to the below links:

Java Tutorial: https://www.tutorialandexample.com/java-tutorial

C# Tutorial: https://www.tutorialandexample.com/csharp-tutorial

Firefox (Gecko Driver) WebDriver has a built-in implementation. And we need plug-ins to other browsers for specific drivers to communicate and run the test scripts.

Browsers supported by WebDriver is as following:

  • Google Chrome Browser
  • Mozilla Firefox
  • Internet Explorer Browser
  • Safari Browser
  • Microsoft Edge Browser
Web driver Introduction 1

Architecture of Selenium WebDriver

There are four necessary components of Selenium WebDriver Architecture:

  • Selenium Language Bindings
  • JSON Wire Protocol
  • Browser Drivers
  • Real Browsers
Web driver Introduction 2

Selenium Language Bindings/Client libraries:

Selenium supports multiple languages like Java, Ruby, Python, etc.; Developers have developed language bindings to allow Selenium to support various libraries. Once you go through the test (the complete selenium code), which we have written, that has to be converted into JSON format.

We can download the supported language bindings with the help of the below link.

https://www.seleniumhq.org/download/#client-drivers

JSON Wire Protocol:

JSON stands for JavaScript Object Notation. It is used to exchange data on the web. JSON files are sent to the browser driver, which is also known as the server through HTTP protocol. And each Browser Driver like- Firefox Driver, Chrome Driver, has its HTTP server.

Note: Each browser contains a separate browser driver.

Browser drivers:

Selenium WebDriver are specific to each browser and establish a secure connection with the browser without disclosing any internal functionality of the browser.

The browser driver communicated with its respective browser and executed the command by interpreting JSON, which is a receiver on the browser. And response will go back in the form of http.

While executing a test script with the help of WebDriver, the following activities performed internally:

  • For each Selenium command, the HTTP request generated and sent to the browser driver.
  • The driver receives the HTTP request with the help of the HTTP server.
  • The HTTP Server performed all the steps and instructions which are executed on the browser.
  • In the last activities, the execution status sent back to the HTTP Server.

Real Browsers:

The browser driver receives a response from the browser and JSON response to the client.

Browsers supported by Selenium WebDriver:

  • Internet Explorer
  • Mozilla Firefox
  • Google Chrome
  • Safari
  • Microsoft Edge

 

 

Selenium Web-driver Topics


Related Topics

First test case of Selenium-IDE

First Test Case of Selenium-IDE: In this part, we are discussing how to create a basic test case in Selenium-IDE: The entire test script execution process in Selenium -IDE can be divided...

4 minutes read.

Verification Controls Methods in Selenium WebDriver

Verification Controls Methods  The verification controls methods are used to check whether the web element is displayed, enabled, and selected. Some of the most commonly used verification controls are as follow: Verification controls Description Return...

4 minutes read.

Selenium WebDriver Tutorial

Seleniun WebDriver Introduction Selenium WebDriver is the essential tool of Selenium Tool Suite because it can directly communicate the browser without any server.  Selenium WebDriver is a browser automation framework that accepts...

3 minutes read.

Selenium WebDriver – Web Element Controls

Selenium WebDriver – Web Element Controls A web element is an interface that is implemented by a remote web element class. The Web element control can be used to perform the data...

1 minute read.

Selenium WebDriver-CSS Selector: Tag and Class

Selenium WebDriver-CSS Selector: Tag and Class We will locate the web element with the help of tag and class CSS selector in this section of the tutorials Where Tag and class are...

4 minutes read.

Selenium WebDriver – Window handling

Selenium WebDriver – Window handling In this tutorial, we will understand how we can handle the window, multiple windows, and pop-ups in selenium WebDriver. We have different types of window, and pop-ups...

7 minutes read.

Selenium WebDriver- Microsoft Edge Browser

Selenium WebDriver- Microsoft Edge Browser: In this tutorial, we will learn how to launch the Microsoft Edge browser in the Selenium WebDriver. Before we start automating our test script with Microsoft Edge...

4 minutes read.

Selenium IDE Tutorial for Beginners

Selenium IDE Introduction Selenium IDE stands for Integrated Development Environment. Selenium-IDE is released in 2006 and developed by SHINYA [JAPAN] THOUGHTWORK Company. Selenium IDE implemented as a Firefox plug-in, and concedes the record, edit, and debug tests....

2 minutes read.

Selenium WebDriver- Radio button handling

Selenium WebDriver- Radio button handling In this tutorial, we will be learning about handling the radio button in selenium WebDriver. Let us take one example to give you a better understanding of...

3 minutes read.

Selenium WebDriver - Google Chrome Browser

Selenium WebDriver - Google Chrome Browser In this tutorial, we will learn how to run our Selenium Test Scripts in the Google Chrome Browser. To implement the WebDriver protocol with the help...

3 minutes read.

Difference between Selenium WebDriver and Selenium RC

Difference between Selenium WebDriver, and Selenium RC: Selenium WebDriver and selenium RC (Remote Control) both are different in any manners which we see later in this tutorial, let us see the...

3 minutes read.

Selenium WebDriver-XPath Locator

Selenium WebDriver-XPath Locator The locators can make the object identification of all the selenium tools. There are eight locators available in selenium web driver, but most of the time we go for...

14 minutes read.

CSS Selector Locator in Selenium IDE

It used to identify the web element based on HTML tag, id, class, and attributes. To describe the look and formatting of a document written in the markup language are known...

1 minute read.

Selenium WebDriver Characteristics

Characteristics of Selenium WebDriver Some of the essential characteristics of Selenium WebDriver are as follows: Multiple Operating System Support Selenium Webdriver supports multiple operating systems like: Desktop OS: Window, Linux, and macOS Mobile OS:...

2 minutes read.

Selenium Wait

In this tutorial, we will understand how we can avoid synchronization issues while executing the test script in a selenium WebDriver. Before going further in this tutorial, first, we will understand that...

10 minutes read.

Selenium WebDriver-CSS Selector locator

Selenium WebDriver-CSS Selector locator A CSS selector is used to identify the web element based on their “# id” and “. Class”, Html tags, and attributes. A CSS stands for Cascading Style...

1 minute read.

Selenium Tutorial

What is Selenium? Selenium is a functional testing tool and compatible with the non-functional testing tools also. Selenium is free and does not require any licensing. Functional tests script executed by...

6 minutes read.

Operational Controls Methods in Selenium WebDriver

Operational Controls Methods The Operational controls are used to perform all the actions on the web elements like click on the button, pass the value in the text box, and click...

4 minutes read.

Selenium Tool Suite

The selenium tool suite is a combination of multiple software tools, and the entire tools having a different approach to support automation testing. Selenium test tool suites are as follows- Selenium...

2 minutes read.

Drawback or Limitations of Selenium

Drawback or Limitations of Selenium Followings are the Drawback or limitations of Selenium:- Drawback /LimitationsDescriptionDesktop applications cannot be automated by Selenium.To test the desktop application, we have tools like Test Complete, Winnium, and...

2 minutes read.