I have below java code to find a element list. how to implement a implicit wait for it. (without using Thread.sleep(XXX)) ?
List<WebElement> datasetList = webDriver.findElements(elementListLocator);
I have below java code to find a element list. how to implement a implicit wait for it. (without using Thread.sleep(XXX)) ?
List<WebElement> datasetList = webDriver.findElements(elementListLocator);
Implicit wait work at WebDriver level.
Explicit wait work at WebElement level.
If it is just for visibility of list of web elements, you could try something like this :
WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds)
wait.until(ExpectedConditions.visibilityOfAllElements(List<WebElement> elements));
You can just pass the datasetList
reference in place of elements, that'd do the job.