

To execute Selenium WebDriver testing using JUnit we have to add JUnit annotations in your test. JUnit has been important in the development of test-driven development. JUnit is a unit testing framework for the Java programming language. TestNG and JUnit are the mostly used frameworks in selenium webdriver for reporting the bugs in document format like excel sheet. In case, we change it to Chrome Driver means, the same script run on Chrome driver and we can find the result too. For example, instead of Firefox driver, we can replace it by Chrome driver. If we want to run the same script in Chrome or IE browser, just we make some little changes are enough in the script. The last example script only run in Firefox browser. String expectedTitle = “PROBESEVEN :: Online Branding Company” In he bellow example scripts developed for Firefox.

Here we can create a script and run it in different browser. So we can create a single script and run it on different browser. If we writing a script for Fire fox browser, we can change the same script for IE or other browser with a little change like browser name.

Selenium 2.0 (Webdriver), the supported browsers vary depending on whether you are using Selenium-Webdriver scripts like Firefox, IE, Safari or Chrome.We can write the testing scripts and run in any browser and finding the result easily. For web application testing, it provides standard programming interface.It provides the improved reliability between browsers.WebDriver is open source & it allows you to easily integrate with testing framework like JUnit or TestNG.Using WebDriver can easily find the coordinates of any object.It supports features like Page navigation, Drag-and-drop and AJAX-based UI elements.Added advantage to support for iPhone and Android testing.No need to start server prior to start executing scripts.Improved features & functionality which were not supported in the Selenium 1.0.Integrating WebDriver into Selenium is the current result of those efforts. The developers of Selenium and of WebDriver felt they could make significant gains for the Open Source test automation community be combining forces and merging their ideas and technologies.

Integrating WebDriver is another step in that process. WebDriver does not depend on a JavaScript core embedded within the browser therefore it is able to avoid some long-running Selenium limitations.The Selenium developers strive to continuously improve Selenium. It also provides an alternative API with functionality not supported in Selenium-RC. Web Driver uses a different underlying framework from Selenium’s java-script Selenium-Core.
