Selenium
Dataprovider & TestNG XML: Parameterization in Selenium(Example)
As we create software, we always wish it should work differently with a different set of data....
Selenium Webdriver is an open-source collection of APIs which is used for testing web applications. The Selenium Webdriver tool is used for automating web application testing to verify that it works as expected or not. It mainly supports browsers like Firefox, Chrome, Safari and Internet Explorer. It also permits you to execute cross-browser testing.
WebDriver also enables you to use a programming language in creating your test scripts (not possible in Selenium IDE).
You can now use conditional operations like if-then-else or switch-case. You can also perform looping like do-while.
Following programming languages are supported by WebDriver
You do not have to know all of them. You just need to be knowledgeable in one. However, in this tutorial, we will be using Java with Eclipse as our IDE.
Before the advent of WebDriver in 2006, there was another, automation tool called Selenium Remote Control. Both WebDriver and Selenium RC have following features:
So how do they differ? Let us discuss the answers.
WebDriver's architecture is simpler than Selenium RC's.
WebDriver is faster than Selenium RC since it speaks directly to the browser uses the browser's own engine to control it.
Selenium RC is slower since it uses a Javascript program called Selenium Core. This Selenium Core is the one that directly controls the browser, not you.

WebDriver interacts with page elements in a more realistic way. For example, if you have a disabled text box on a page you were testing, WebDriver really cannot enter any value in it just as how a real person cannot.
Selenium Core, just like other JavaScript codes, can access disabled elements. In the past, Selenium testers complain that Selenium Core was able to enter values to a disabled text box in their tests. Differences in API
Selenium RC's API is more matured but contains redundancies and often confusing commands. For example, most of the time, testers are confused whether to use type or typeKeys; or whether to use click, mouseDown, or mouseDownAt. Worse, different browsers interpret each of these commands in different ways too!
WebDriver's API is simpler than Selenium RC's. It does not contain redundant and confusing commands.
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. This accelerates your test execution cycles.
Since it is invisible to the user, it can only be controlled through automated means.
Selenium RC cannot support the headless HtmlUnit browser. It needs a real, visible browser to operate on.
Remember that WebDriver operates on the OS level. Also, remember that different browsers communicate with the OS in different ways. If a new browser comes out, it may have a different process of communicating with the OS as compared to other browsers. So, you have to give the WebDriver team quite some time to figure that new process out before they can implement it on the next WebDriver release.
However, it is up to the WebDriver's team of developers to decide if they should support the new browser or not.
Selenium RC automatically generates an HTML file of test results. The format of the report was pre-set by RC itself. Take a look at an example of this report below.
WebDriver has no built-in command that automatically generates a Test Results File. You would have to rely on your IDE's output window, or design the report yourself using the capabilities of your programming language and store it as text, HTML, etc.
As we create software, we always wish it should work differently with a different set of data....
TestNG enables you to run test methods, test classes and test cases in parallel inside your...
Following is a step by step guide to install TestNG in Eclipse Installing TestNG in Eclipse Step 1)...
What is Sikuli? SIKULI is an open-source GUI based test automation tool. It is mainly used for...
What is Page Object Model? Page Object Model (POM) is a design pattern, popularly used in test...
Some web application, have a functionality to drag web elements and drop them on defined area or...