WebElement dropDown = driver.findElement(By.id("list_bus_suggestion"));
Select suggestionList = new Select(dropDown);
List<WebElement> allOptions = suggestionList.getOptions();
for (int i = 0; i < allOptions.size(); i++) {
String drop_down_values = allOptions.get(i).getText();
System.out.println("dropdown values are " + drop_down_values);
}
错误显示在select语句中,
org.openqa.selenium.support.ui.UnexpectedTagNameException:元素应该是“select”但是“android.widget.ExpandableListView”