0
我想點擊香料噴氣預訂航班頁。我寫在網絡驅動器格式,但按鈕無法下面的代碼的單向單選按鈕,單擊無法點擊的單選按鈕
public void flight() throws Exception{
driver.get("http://www.spicejet.com/FlyForSure.aspx");
driver.manage().window().maximize();
WebDriverWait wait=new WebDriverWait(driver,40);
driver.findElement(By.cssSelector("input.AvailabilitySearchInputCompactSearchVi_OneWay")).click();
}
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
spice a1=new spice();
a1.flight();
}
}
錯誤信息;
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"css selector","selector":"input.AvailabilitySearchInputCompactSearchView_OneWay"}
Command duration or timeout: 15.96 seconds
你怎麼......可以請註明 – swagatika