io.github.kgress.scaffold.webelements.WebElementWait Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
Core components for Scaffold
package io.github.kgress.scaffold.webelements;
import io.github.kgress.scaffold.webdriver.WebDriverWrapper;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
public class WebElementWait {
private AbstractWebElement element;
private WebDriverWrapper driver;
WebElementWait(WebDriverWrapper driver, AbstractWebElement element) {
this.driver = driver;
this.element = element;
}
public void waitUntilDisplayed() {
// Do a custom condition here to handle if we're using a webelement instead of a by locator for this element
driver.getAutomationWait().waitForCustomCondition(new ExpectedCondition() {
@Override
public Boolean apply(WebDriver input) {
return element.isDisplayed();
}
@Override
public String toString() {
return element.toString();
}
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy