package kaoshi;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriver.Navigation;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class chengpin {
private WebDriver driver;
@Before
public void beforeEach() {
System.setProperty("webdriver.chrome.driver","D:\\software\\java-jar+utils\\seleniumForChrome\\chromedriver2.40_win32\\chromedriver.exe");
driver = new ChromeDriver();
}
@After
public void afterEach() {
driver.quit();
}
@Test
public void test() throws InterruptedException {
//进入去哪儿的官网
driver.get("https://www.qunar.com/");
//功能测试题目第一题
//点击单程单选框
driver.findElement(By.id("js_searchtype_oneway"))
java+selenium+携程实战项目
最新推荐文章于 2024-07-11 11:12:26 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)