Thursday, 16 February 2012

Close all browser windows opened by selenium webdriver


import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class dadabhagwan_LearnSeleniumWithJasmine {

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

WebDriver dadabhagwan_driver1 = new  FirefoxDriver();

WebDriver dadabhagwan_driver2 = new  FirefoxDriver();

dadabhagwan_driver1.get("http://www.dadabhagwan.org/");
Thread.sleep(5000L);
dadabhagwan_driver2.get("http://kids.dadabhagwan.org/");

WebDriver dadabhagwan_driver3 = new  FirefoxDriver();
Thread.sleep(5000L);
dadabhagwan_driver2.get("http://www.dadashri.org/");

WebDriver dadabhagwan_driver4 = new  FirefoxDriver();
Thread.sleep(5000L);
dadabhagwan_driver2.get("http://dadabhagwan.tv/");


WebDriver dadabhagwan_driver5 = new  FirefoxDriver();
Thread.sleep(5000L);
dadabhagwan_driver2.get("http://satsang.dadabhagwan.org/");

dadabhagwan_driver1.quit();
dadabhagwan_driver2.quit();
dadabhagwan_driver3.quit();
dadabhagwan_driver4.quit();
dadabhagwan_driver5.quit();

}

}