I have list of web element, when I apply listName.size() function on list, it shows count as 1.
Where as in actual the count is not 1.
Below things I have tried -
- Tried applying implicit and explicit wait in order to load the long list of web elements properly.
- Tried wait.until(ExpectedConditions.visibilityOfElementLocated(listName));
java code :
List<WebElement> listName= driver.findElements(By.xpath("xpath"));
int count = listName.size();
I want the count exact as the number elements of list found by using xpath. Note: The xpath is valid and correct. Can locate the elements manually with that xpath.