Lorem

Delete this widget in your dashboard. This is just an example.

Ipsum

Delete this widget in your dashboard. This is just an example.

Dolor

Delete this widget in your dashboard. This is just an example.
 

Getting Started with WebDriver (a Browser Automation Tool)

Wednesday, August 3, 2011




A few weeks ago during Pankaj B, Chirag S demonstrated using Web Driver to create functional tests in Java. It was a pretty cool demo and I meant to give it a whirl for a while, but only got around to doing it this weekend. I had to refer back to the recording of the session a number of times, so I thought it would be worthwhile to document the steps to get a project up and running in Eclipse that uses WebDriver. Let's start with some background.

What is Web Driver?
Web Driver is a tool that allows you to write code, in a number of languages, that automates a browser and allows you to interrogate what is rendered by the browser. You can use these features to created automated tests of a web application. You may be familiar with a tool called Selenium, which does similar things, but works within the context of a web browser itself. The Selenium project and the WebDriver project are merging to create Selenium 2.0. That project is a work in progress, but there's nothing to stop you from experimenting with Web Driver right now.
For a bit more of an official definition, here's some info from the Selenium 2.0 and Web Driver page at Selenium HQ:

Web Driver is a tool for automating testing web applications, and in particular to verify that they work as expected. It aims to provide a friendly API that's easy to explore and understand, which will help make your tests easier to read and maintain. It's not tied to any particular test framework, so it can be used equally well with JUnit, TestNG or from a plain old "main" method.
Web Driver uses a different underlying framework from Selenium's javascript Selenium-Core. It also provides an alternative API with functionality not supported in Selenium-RC. Web Driver does not depend on a javascript core embedded within the browser, therefore it is able to avoid some long-running Selenium limitations.
A well-designed standard programming interface for web-app testing.
-> Improved consistency between browsers.
-> Additional functionality addressing testing problems not well-supported in Selenium 1.0.
->
Web Driver's goal is to provide an API that establishes


I hope to write a number of posts about working with Web Driver. This first post will be a quick guide to setting up an Eclipse project and getting Web Driver to interact with a web page. Let's get started.



0 comments:

Post a Comment

Selenium

Please note: Delete this widget in your dashboard. This is just a widget example.

Webdriver

Please note: Delete this widget in your dashboard. This is just a widget example.

Protector/Jasmine

Please note: Delete this widget in your dashboard. This is just a widget example.