use of com.capgemini.mrchecker.selenium.core.exceptions.BFElementNotFoundException in project devonfw-testing by devonfw.
the class DriverExtention method findElementDynamicBasic.
private WebElement findElementDynamicBasic(By by, long startTime, int timeOut) throws BFElementNotFoundException {
WebElement element = null;
WebDriverWait wait = webDriverWait(timeOut);
try {
element = wait.until((Function<? super WebDriver, WebElement>) ExpectedConditions.presenceOfElementLocated(by));
} catch (TimeoutException | NoSuchElementException e) {
boolean isTimeout = true;
throw new BFElementNotFoundException(by, isTimeout, timeOut);
}
BFLogger.logTime(startTime, "findElementDynamic()", by.toString());
return element;
}
use of com.capgemini.mrchecker.selenium.core.exceptions.BFElementNotFoundException in project devonfw-testing by devonfw.
the class NewRemoteWebDriver method findElement.
/**
* @deprecated As of release 1.0.0, replaced by {@link #findElementDynamic(By)()}
*/
@Deprecated
@Override
public WebElement findElement(By by) throws BFElementNotFoundException {
BasePage.getAnalytics().sendMethodEvent(BasePage.analitycsCategoryName);
WebElement elementFromDriver = null;
try {
elementFromDriver = super.findElement(by);
} catch (NoSuchElementException e) {
throw new BFElementNotFoundException(by);
}
return new NewRemoteWebElement(elementFromDriver);
}
Aggregations