@Friends我是初学者,所以请指导我,如果下面的xpath是正确的,请告诉我
<ol `id ="no_0a_autocomplete_list" class="autocomplete_list" style..">
<li class="item current_item" onselect="this.text.value ='DELHI (DLI)'; ">
<li class="item" onselect="enter code herethis.text.value ='DELHI (DLI)'; ">
<span>(DLI)</span>DELHI</li>
硒代码
WebElement OlElement= driver.findElement(By.xpath("//*[@id='no_0a_autocomplete_list']"));
List<WebElement> Str= OlElement.findElements(By.tagName("/li/span[text()='(DLI)']"));
for(WebElement testlist : Str)
{ // Perform click//}