1
我將如何通過下拉列表中的9個選擇進行循環......比如說它有9個不同的值,我將如何使用select來使它們全部通過?通過下拉webdriver循環
例。值分別是 紅 藍綠色 紫
到目前爲止,我有
for (int i=0; i<4; i++){
WebElement ClubDropDown = driver.findElement(By.id("tenantList"));
Select CDropdown = new Select(ClubDropDown);
// This is the part I'm stuck on how to make it loop through the drop downs and preform the defined public void cases
OpenMp(); // This is one of my public void test cases
}
您能否考慮共享相關的HTML DOM?請提及您的手動測試步驟,以便我們可以更好地指導您。謝謝 – DebanjanB