Automating jQuery based bootstrap dropdown using Selenium and Java
问题 I am trying to list all elements from the bootstrap dropdown and then select a certain value. However, it returns 0 values. Any suggestions will be greatly appreciated. driver.findElement(By.id("imgSelectButton")).click(); Thread.sleep(3000); List<WebElement> list = driver.findElements(By.xpath("//ul/li[@class='logoSelectOpt']//li")); System.out.println(list.size()); for(int i=0; i<list.size(); i++){ System.out.println(list.get(i).getText()); if (list.get(i).getText().contains("History")){