autosuggestionselect(By.xpath(
Configurations.getSalesLocator("//ul/li/a[text()='"+InvestigationNo+"']")));
public void autosuggestionselect(By by) throws InterruptedException {
List <WebElement> Elements = driver.findElements(by);
System.out.println(Elements.size());
for (WebElement element : Elements) {
System.out.println(element.getText());
String actual = InvestigationNo;
String expected = element.getText();
Thread.sleep(5000);
if (actual.equals(expected)) {
element.click();
break;
}
}
}
当我尝试从自动建议列表中选择项目时会发生这种情况。请帮忙。