LambdaTest Community

Find answers, support, and inspiration from other users

Questions
LambdaTest Community
Answered

How do I learn Selenium WebDriver?

Can anyone please tell me how do i learn selenium webdriver.

Up Vote Down Vote 0 Votes
Posted 3 months ago

Answers


Selenium WebDriver framework is more widely used when compared to Selenium IDE & Selenium RC. Unlike Selenium RC which is based on the client-server model, Selenium WebDriver framework is implemented through a browser-specific driver e.g. each browser will have its corresponding WebDriver application on which the automation testing would be performed.

Hence, Selenium WebDriver directly communicates with the browser due to which it does not require any separate component like the Selenium Server. It supports top programming languages helpful for a software tester namely C#, Ruby, Java, Python, Perl, etc. Before you go ahead in this Selenium WebDriver tutorial, make sure to download the Selenium WebDriver for the browser on which cross browser testing is being performed. You can download Selenium WebDriver from the links that are mentioned below:

Firefox: https://github.com/mozilla/geckodriver/releases

Chrome: http://chromedriver.chromium.org/downloads

Internet Explorer: https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver

Microsoft Edge: https://blogs.windows.com/msedgedev/2015/07/23/bringing-automated-testing-to-microsoft-edge-through-webdriver/

Selenium WebDriver Architecture

As a part of Selenium WebDriver tutorial, it is imperative to have a look at the major blocks that comprise the Selenium WebDriver architecture:

  • Selenium Client Libraries
  • JSON Wire Protocol
  • Browser Drivers
  • Browsers

Let’s have a look at each component in more detail.

Selenium Client Libraries

As mentioned earlier, developers can use Selenium to write test code in different languages like C#, Java, Python, Perl, etc. The multi-language support is possible due to Selenium Client Libraries or Selenium Language Bindings. For example, if you are writing code in Python, you would require Python client libraries. Selenium Client Drivers for different programming languages can be downloaded from here.

JSON Wire Protocol

JSON (JavaScript Object Notation) Wire Protocol facilitates the transfer of data between the Client & Server. It is the REST (Representational State Transfer) based API. Each browser will have its own browser driver.

Browser Drivers

Browser Driver is mainly used for communicating with the browsers. Since the internal logic of the browser & its functionality is not revealed, Browser Driver ensures the necessary layer of ‘encapsulation’ in order to keep execution level details more abstract. Each browser has its corresponding Browser Driver. Please refer to the section titled Selenium WebDriver in this Selenium WebDriver tutorial, that section contains deleted information about the location from where you can download the Browser Drivers.

Browsers

Since Browser Drivers are available for popular browsers like Chrome, Firefox, Internet Explorer, Safari, Microsoft Edge, etc., you can use either of them for performing cross browser testing. It should be noted that you cannot perform cross browser testing of a website on a browser whose Browser Driver is not publicly available.

Up Vote Down Vote 0 Votes
Posted 3 months ago