Thursday, 13 November 2014

Selenium webdriver architecture

Selenium webdriver architecture mainly divided into three parts
Language level bindings
Selenium Webdriver API
Drivers
1) Language Level Bindings :
We can see at the Left hand side here we’ve got some bindings and these are language level bindings and with which we can implement the Selenium webdriver code. In simple words these the languages in which are making an framework, will interact with the Selenium Webdriver and work on various browsers and other devices. So we have a common API that we use for Selenium that has a common set of commands and we have various bindings for the different languages. So we can see there’s Java, Java, Python, Ruby, there’s also some other bindings and new bindings can be added very easily.
2) Selenium Webdriver API:
Now these bindings communicate with Selenium Webdriver API and and This API send the commands taken from language level bindings interpret it and sent it to Respective driver. API contains set of common library which allow to send command to respective drivers.
3) Drivers:
Drivers here at the right hand side, we see we have various internet browser specific drivers such as IE driver, a Firefox, Chrome, and other drivers such as HTML unit which is an interesting one. It works in headless mode which make text execution faster. It also contains mobile specific drivers as well. But the basic idea here is that each one of these drivers knows how to drive the browser that it corresponds to. So the Chrome driver knows how to handle the low level details of Chome browser and drive it to do things like clicking button, going into pages, getting data from the browser itself, the same thing for Firefox, IE, and so on.
How all blocks work together?
So what’s happening here is we’re going to write our test in let’s say in Java and we’re going to be using common Selenium API and that Java binding is going to be sending command across this common WebDriver API. Now on the other end is going to be listening a driver, It’s going to interpret those commands and it’s going to execute them on the actual browser and then it’s going to return the result backup using the WebDriver API to our code where we can look at that result.
How it's working ?
We are writing our test in Java using common selenium API and that Java binding is sending commands across this common API. Now on the other end is listening a driver, it interpret those commands and executing them on the actual browser and return result backup using the API.

4 comments:

  1. When we speak of Selenium, we are actually talking about both its flavours: Selenium WebDriver and Selenium IDE. Both automate browsers in support of web application testing. WebDriver is typically used to create browser-based regression tests, whereas Selenium IDE is most advantageous in creating unit tests, exploratory tests and one-off bug reproduction scripts. There is no need to make further distinctions between the two, however, when discussing Selenium’s advantages and disadvantages.
    Selenium Training in Chennai | Selenium Trianing in Velachery

    ReplyDelete
  2. The blog gave me idea about each and every components of selenium webdriver architecture in an effective manner Thanks for sharing it
    Selenium Traaining in chennai

    ReplyDelete
  3. Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
    Data science Course Training in Chennai | Data Science Training in Chennai
    RPA Course Training in Chennai | RPA Training in Chennai
    AWS Course Training in Chennai | AWS Training in Chennai

    ReplyDelete
  4. nice course. thanks for sharing this post this post harried me a lot.
    Selenium Training in Noida

    ReplyDelete