"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;
Showing posts with label Web Driver. Show all posts
Showing posts with label Web Driver. Show all posts

July 12, 2010

Web Driver

WebDriver (Built on top of selenium by google. UI Testing Framework)
Simple Example
1. Installed webdriver from link http://code.google.com/p/selenium/?redir=1
2. Extract and start eclipse plug-in. Create a Java Project and Add the Extracted JAR files in the project

3. Copied the code from Link - http://google-opensource.blogspot.com/2009/05/introducing-webdriver.html. Modified the code to try it out in irctc.co.in
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TestPoc1 {
/**
* @param args
*/
public static void main(String[] args)
{
    // TODO Auto-generated method stub
    // Create an instance of WebDriver backed by Firefox
    WebDriver driver = new FirefoxDriver();
    driver.get("http://www.irctc.co.in");
    driver.findElement(By.linkText(("Find Agents"))).click();
    WebElement searchBox = driver.findElement(By.name("pincode"));
    searchBox.sendKeys("560001");
    driver.findElement(By.name("Submit")).click();
}
}
4. Run this code as Java Application in elipse editor
5. References
http://google-opensource.blogspot.com/2009/05/introducing-webdriver.html
http://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions
http://code.google.com/p/selenium/w/list
http://blog.activelylazy.co.uk/2010/05/05/testing-asynchronous-applications-with-webdriver/
http://www.phpvs.net/2008/02/25/10-tips-for-building-selenium-integration-tests/
http://seleniumhq.org/docs/09_webdriver.html
http://www.theautomatedtester.co.uk/tutorials/selenium/xpath_exercise1.html
New Web Testing Tool -- WebDriver
What is Selenium WebDriver
Selenium Vs Webdriver
Getting Started with WebDriver (a Browser Automation Tool)
Good Reads
Tool #1 – WebDriver (Built on top of selenium by google. UI Testing Framework)

Tool#2 -fighting-layout-bugs a library for automatic detection of layout bugs in web page