我試圖自動化一個網頁,我無法識別靜態下拉。無法識別靜態下拉
<select name = "homeURL" tabIndex = "4" class = "storeId" >..</select>
我試着使用下述代碼中使用選擇類
Select dropdown = new Select(driver.findElement(By.name("homeURL"))); dropdown.selectByIndex(2);
我收到以下錯誤,以確定它:
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find element with name == homeURL (WARNING: The server did not provide any stacktrace information)
退房http://stackoverflow.com/questions/30799545/selenium-web-driver-findelementby-name-and-headless-browser –