Saturday, January 21, 2012

Selenium 2.0 or Selenium Web Driver

Selenium Web Driver Features:
The primary new feature is the integration of the WebDriver API. This addresses a number of limitations along with providing an alternative, and simpler, programming interface. The goal is to develop an object-oriented API that provides additional support for a larger number of browsers along with improved support for modern advanced web-app testing problems.
  • WebDriver API
  • Selenium Server not needed
  • WebDriver is the name of the key interface against which tests should be written, but there are several implementations.

The Selenium Server – When to Use It:

You may, or may not, need the Selenium Server, depending on how you intend to use Selenium. If you will be strictly using the WebDriver API you do not necessarily need the Selenium Server. Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation. How these direct calls are made, depends on the browser you are using. See the information for each browser implementation below.
Some reason why you will need the Selenium-Server:
  • You are using Selenium-Grid to distribute your tests over many machines / VMs.
  • You want to connect to a remote machine that has a particular browser version that is not on your current machine.
  • You are not using the Java bindings and would like to use HtmlUnit Driver 
Required Things:
  • FireFox advance version Ex. 9.0.1
  • Selenium IDE Ex. 1.5.0
  • Firebug Ex. 1.9.0
  • Some JAR files:
  1. selenium-server-standalone-2.15.0.jar
  2. selenium-java-2.15.0.jar
  • Eclipse IDE
  • JUnit 4 instead of JUnit 3
  • ANT and build.xml file  

Getting Started With Selenium-WebDriver:

WebDriver is a tool for automating web application testing, and in particular to verify that they work as expected. It aims to provide a friendly API that’s easy to explore and understand, easier to use than the Selenium-RC (1.0) API, which will help to make your tests easier to read and maintain. It’s not tied to any particular test framework, so it can be used equally well in a unit testing or from a plain old “main” method.

    1 comment:

    1. hi,
      Thank you so much for posting this. I really appreciate your work. Keep it up. Great work

      http://kosmiktechnologies.com/selenium/

      ReplyDelete