auto_getWebElement

private WebElement auto_getWebElement(By locator) {
     WebElement element=null;
        try {
            element = getDriver().findElement(locator);
        } catch (Exception e1) {
            try {
                element =this.auto_getWait().until(ExpectedConditions.presenceOfElementLocated(locator));

            } catch (Exception e2) {
                LOGGER.error("Element '"+ locator+"' not present - Exception: ".concat(e2.getMessage()));
                throw(e2);

            }
        }
        return element;
}
What are your feelings
Scroll al inicio