0
我試圖使用下拉選擇,但它給我的錯誤定位:異常螺紋:UnexpectedTagNameException
異常線程「main」 org.openqa.selenium.support.ui.UnexpectedTagNameException:元素應該是「選擇」 但 「輸入」
與ByIndex,根據值但試過它不工作
代碼
Select dropdown = new
Select(driver.findElement(By.id("ctl00_MainContent_ddlLocale_Input")));
//dropdown.selectByIndex(2);
dropdown.selectByValue("Austria: Vienna");
HTML
td class="rcbInputCell rcbInputCellLeft" style="width:100%;">
<input id="ctl00_MainContent_ddlLocale_Input" class="rcbInput ui-widget- content" type="text" value="Austria: Vienna" name="ctl00$MainContent$ddlLocale" autocomplete="off"/>