The webdriver in Selenium is an automation framework used to carry out testing in the web in multiple browsers. It can support more than one operating system as well. It comes with no cost.
Selenium can used with languages like −
Selenium webdriver can be used HTMLUnit browsers which are headless in nature. Thus the execution can happen in invisible mode without a GUI. The headless execution is preferred as it consumes less resources.
Selenium can be used with browsers like −
The structure of webdriver is illustrated below −
As a test script is executed, a HTTP request is generated for every command in Selenium and passed to the browser driver. The browser driver takes the help of a HTTP server for obtaining the HTTP request.
The HTTP server decides the steps required for implementing the Selenium commands. After the commands are run on the browser, the status is sent to the HTTP Server which in return sends it to the automation test.
Selenium Webdriver is created such that it has an uncomplicated and precise interface for programming. It fixes some of the limitations of the Selenium RC API. It is a closely packed object oriented API compared to Selenium1.0. It is faster and plugs in the shortcomings of Selenium 1.x.
Webdriver is an interface and the classes implementing its methods are −