> For the complete documentation index, see [llms.txt](https://gyansetu-selenium.gitbook.io/selenium-testing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gyansetu-selenium.gitbook.io/selenium-testing/what-is-selenium-webdriver.md).

# What is selenium WebDriver?

&#x20;WebDriver in selenium is an Interface and it is designed to overcome some limitations of selenium RC.\
&#x20;Selenium WebDriver is also known as Selenium 2.

&#x20;Selenium 2 supports most of all browsers to run your test cases and many programming languages like C#, Java, Python, Ruby, .Net, Perl, PHP, etc.. to create and modify your test scripts.

![](/files/-LTkwW1UN-R98TMzgFL9)

&#x20;You first need to launch a separate application called Selenium Remote Control (RC) Server before you can start testing

* &#x20; Selenium RC Server "injects" a Javascript program called Selenium Core into the browser.
* &#x20;Once injected, Selenium Core will start receiving instructions from the RC Server from your test program.
* &#x20; When the instructions are received, Selenium Core will execute them as Javascript commands.&#x20;
* &#x20;The browser will execute the instructions of Selenium Core, and will relay its response to the RC Server.&#x20;
* &#x20;RC Server will fetch the next instruction from your test script to repeat the whole cycle.

![](/files/-LTkwhr6BB0GMbQMZUn8)

* &#x20; Selenium WebDriver does not require selenium server for running test.&#x20;
* &#x20;It controls the browser from the OS level&#x20;
* &#x20;All you need are your programming language's IDE (which contains your Selenium commands-e.g. Eclipse) and a browser.

#### &#x20;Advantages:

&#x20; Speed WebDriver is faster than Selenium RC since it interacts directly to the browser WebDriver is faster than Selenium RC since it interacts directly to the browser

#### &#x20;Browser Support

&#x20;WebDriver can support the headless HtmlUnit browser.HtmlUnit is termed as "headless" because it is an invisible browser - it is GUI-less.It is a very fast browser because no time is spent in waiting for page elements to load.

#### &#x20;API&#x20;

WebDriver's API is simpler than Selenium RC's. It does not contain redundant and confusing commands like RC. \*\* RC contain redundant and confusing commands like type or typeKeys, click, mouseDown, or mouseDownAt etc

#### &#x20;Disadvantages:

&#x20;It cannot readily support new browsers, but Selenium RC can.

&#x20;It does not have a built-in command for automatic generation of test results

#### &#x20;WebDriver Configuration

&#x20;Step 1: Download and install Java in your system

&#x20;Step 2: Download and install Eclipse&#x20;

Step 3: Download WebDriver Jar Files. (<http://www.seleniumhq.org/)&#x20>;

Step 4: Start Eclipse and configure it with selenium WebDriver

* &#x20;Select Workspace on eclipse start up&#x20;
* &#x20;File > New > Project > Java Project
* &#x20; Create new package> Create New Class
* &#x20; \> Add external jar files
* &#x20; Right click on project > Select Properties > Select Java build path > Navigate to Libraries tab Click on add external JARs button > Browse the Jar Files to add.

#### &#x20;Example:

&#x20;<http://www.popuptest.com/popuptest1.html>

![](/files/-LTky3WnhMc0qnEmz5EI)

![](/files/-LTky7osnoraSisGQ1bd)
