@Test
public void ConformationAlertBox()throws Exception
public void ConformationAlertBox()throws Exception
{
driver.get("http://seleniumsubbu.blogspot.in/");
Thread.sleep(2000);
driver.findElement(By.xpath("//*[@id='node-221']/div/div[1]/div/div/button")).click();
Thread.sleep(5000);
//driver.switchTo().alert().accept();// accept means :click on "OK" option button
driver.switchTo().alert().dismiss(); // dismiss means : click on "Cancel" option button
}
driver.get("http://seleniumsubbu.blogspot.in/");
Thread.sleep(2000);
driver.findElement(By.xpath("//*[@id='node-221']/div/div[1]/div/div/button")).click();
Thread.sleep(5000);
//driver.switchTo().alert().accept();// accept means :click on "OK" option button
driver.switchTo().alert().dismiss(); // dismiss means : click on "Cancel" option button
}