@Override public WebElement moveToElement(final WebElement element, final int seconds) { return ServiceHelper.actionWithRetry( seconds, new RetryableAction<WebElement>() { public WebElement run(int seconds) { LOGGER.debug("moveToElement: moving to: " + element); actions().moveToElement(element); return element; } }); }
@Override public WebElement moveToBy(final By by, final int seconds) { return ServiceHelper.actionWithRetry( seconds, new RetryableAction<WebElement>() { public WebElement run(int seconds) { WebElement element = waitFor(seconds, new RemotableConditions.ClickableAny(by)); LOGGER.debug("moveToElement: moving by: " + by + ", element: " + element); actions().moveToElement(element); return element; } }); }
@Override public WebElement clickElement(final By by, final int seconds) { return ServiceHelper.actionWithRetry( seconds, new RetryableAction<WebElement>() { public WebElement run(int seconds) { WebElement element = waitFor(seconds, new RemotableConditions.ClickableAny(by)); LOGGER.debug("clickElement: clicking by: " + by); element.click(); return element; } }); }