WebDriver is a tool for automating web application testing, and in particular to verify that functionalities work as expected. It aims to provide a friendly API that’s easy to explore and understand, easier to use than the Selenium-RC (1.0) API, which will help to make your tests easier to read and maintain.
Let us first get clarified about the difference types of selenium that is/was available in the past and the present.
- Selenium RC was the name given to the language bindings for Selenium Core, and is commonly, referred to as just “Selenium” or “RC”. This actually came up with two components. Selenium server and the client libraries.
- Selenium WebDriver fits in the same role as RC did, and has incorporated the original 1.x bindings. It refers to both the language bindings and the implementations of the individual browser controlling code. This is commonly referred to as just “WebDriver” or sometimes as Selenium 2.
Selenium WebDriver working
- WebDriver is designed in a simpler and more concise programming interface along with addressing some limitations in the Selenium-RC API.
- WebDriver is a compact Object Oriented API when compared to Selenium1.0
- WebDriver works at the OS/browser level:
- It drives the browser much more effectively and over comes the limitations of Selenium 1.x which affected our functional test coverage, like the file upload or download, pop-ups and dialogs barrier or self-signed certificates problems
- WebDriver drives the tests natively with the browser and emulates the Human interaction with website. Implementation differs on each browser’s.
The merge of the projects combines the strengths of both frameworks: Selenium 2.0 will provide both Selenium 1.x and WebDriver APIs.
This document concentrates more on WebDriver implementation using the WebDriver Java API.
WebDriver is the name of the key interface against which tests should be written, but there are 11 implementing classes, listed as below: