Overview of Selenium WebDriver

Overview of Selenium WebDriver

Selenium 1.0 (Selenium IDE + selenium RC + Selenium Grid)

Selenium 2.0 (Selenium IDE + Selenium RC + Selenium WebDriver + Selenium Grid)

Note: Selenium WebDriver merged with Selenium 1.0
Selenium WebDriver Introduction:

> It is a most important tool in Selenium suite.

> It is has programming interface allows us to create and execute Test cases against different browsers (ex: Firefox, IE, Google Chrome etc...)

> WebDriver supports various programming languages to enhance Test cases.

> WebDriver supports various operating environments to create and execute Test cases
(Ex: MS Windows, UNIX and Macintosh etc...)

> WebDriver supports Data Driven testing, cross browser testing.

> Webdriver is faster than other tools of Selenium suite.

> WebDriver supports Parallel test execution with the help of TestNG.

> WebDriver doesn't have IDE, only Programming interface.

> WebDriver doesn't have built in Result reporting facility, it provides summary only.
(* with the help of TestNG we can generate HTML test reports.)

> No object Repository in selenium WebDriver (It is for entire Suite), so no centralized maintenance of Objects)
Using Element locators, Webdriver methods and Java programming features we can create
and execute Test cases.

Element Locators - to recognize / identify Elements (Objects)

Webdriver Methods - to perform operations on Elements.

Java programming features - Enhancing Test Cases.
Selenium Webdriver Environment Setup:

i) Download and install Java (JDK) software - to enhance test cases using Java programming features.

ii) Set Path environment variable- to access Java from any directory.

iii) Download Eclipe IDE and extract

iv) Download WebDriver Java Language binding and add Webdriver jar files (in Eclipse)
v) Install Firebug and FirePath plug ins for Mozilla Firefox browser to inspect Elements.

Note: For Internet explorer and Google chrome, no need to install any plug ins, They have built in Developer tools.

Note 2: Element locators and WebDriver methods are common for all browsers, browser driver only varies from one browser to another.

Note 3: Firefox driver is default driver in Webdriver, For IE and Chrome we need to download drivers.
Download Selenium WebDriver Java binding from www.seleniumhq.org website and extract.

Navigation for adding Webdriver jar files in Eclipse.

Create Java project
> Select src and right click
> Build path
> Configure Build Path
> select Libraries tab
> Click "Add External JARs
> Browser path of the WebDriver jars
> Add
Pre-requisites to Create Automated Tests

Test / Test Script / Test Case

> Import WebDriver Libraries and Firefox driver/IE driver/Chrome Driver

> Using Web Element (object) locators and WebDriver methods write object call statements

> Insert Java programmatic statements to enhance Test cases.


Post a Comment