WebDriver Architecture

We use WebDriver to automate web application testing. Selenium WebDriver directly speaks with browsers by using browsers native support. It is in fact easy than the Selenium RC once you start using it. You just need to set up your project, once you have set it, WebDriver acts like a normal library. WebDriver Architecture can be easily understood if you break it into parts and then learn it. So here we will divide the Architecture into three parts :

  • Language Level Bindings
  • WebDriver API
  • Drivers



  1. In the first box you can see that we have mentioned some of the programming languages under Bindings, using these languages we can make a framework. Using these language level bindings we can implement selenium WebDriver code. Once we make the framework using these programming languages, it will help to interact with the selenium WebDriver and then can work on different browsers.
  2. Now the bindings whatever we take and create a framework, communicates with WebDriver API. The WebDriver API interprets the command taken from Bindings and transfers it to the respective Driver. In short you can say that the WebDriver API has a common library which sends commands to respective Drivers.
  3.  Now the Driver interprets the commands send by the WebDriver API on the respective browser. And once the command is executed the result is sent back through the API to you where you can see the result on your system where you have written the code.

So now to understand the whole process is really easy. For example you are using Java, so your java binding will interact with the selenium WebDriver API and then the WebDriver API is having a complete library of commands, so it sends commands to the respective browsers. The Drivers then execute the commands at actual browser and sends the result through the WebDriver API to your system where you have written the code and then you can actually see the result.

For example, you have written your code in Java. So your java code(Binding Code) will issue some commands through the selenium WebDriver. The WebDriver wire protocol can interpret those commands of binding code. The Driver server keeps on waiting for these commands, once it gets the commands it interprets those commands and automates the browser and then throws back the result through the WebDriver API to the code and you will be able to see the result.

Add Comment