I am into Development and new to QA/Automation testing. I am trying to understand the following code;
public WebElement getVisibleElement( final By by, final WebElement parentElement, int timeoutValue, TimeUnit timeoutPeriod, int pollingInterval, TimeUnit pollingPeriod ) {
return fluentWait(timeoutValue, timeoutPeriod, pollingInterval, pollingPeriod).until( new Function<WebDriver, WebElement>() {
public WebElement apply(WebDriver driver) {
try {
} catch {
}
return null;
}
});
}
In my same class, I also have;
public Wait<WebDriver> fluentWait(int timeoutValue, TimeUnit timeoutPeriod, int pollingInterval, TimeUnit pollingPeriod) {
return new FluentWait<WebDriver>(this.webDriver)
.withTimeout(timeoutValue, timeoutPeriod)
.pollingEvery(pollingInterval, pollingPeriod)
.ignoring(NoSuchElementException.class);
}
Specifically 2 things I wanted to understand;
- What is return fluentWait() doing exactly?
- What does the use of until() mean here?