【发布时间】:2018-06-07 04:49:51
【问题描述】:
title : 处理弹出框 在同一窗口上处理 div pop 的 selenium 代码 //包预订;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Dubai {
public static void main(String[] args) throws Exception {
System.setProperty ("webdriver.chrome.driver",
"C:\\Users\\miyau\\Desktop\\test\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://www.thomascook.in/");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.xpath("//div[text()='Not Now']")).click();
System.out.println("operation complit");
}
}
// snapshot of popup## Heading ##
【问题讨论】:
标签: java selenium testing selenium-webdriver automation