Thursday 16 February 2012

Example of HtmlUnitDriver to learn selenium automation testing


import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;


public class dadabhagwan_LearnSeleniumWithJasmine {

public static void main(String[] args) throws InterruptedException {

WebDriver myDriver = new HtmlUnitDriver();

myDriver.get("http://kids.dadabhagwan.org/");
System.out.println(myDriver.getTitle());
System.out.println(myDriver.getCurrentUrl());



}

}