Hi Danish,
i tried like this to handle alert.
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
public class test1 {
/**
* @param args
* @throws InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
WebDriver driver= new FirefoxDriver();
driver.navigate().to("
http://www.agoda.com/?ymsg=1");
Thread.sleep(3000L);
driver.switchTo().alert().accept();
System.out.println("Transaction Completed Successfully");
driver.close();
}
}
--
SATEESH BABU.K