
website.automate.jwebrobot.executor.action.MoveActionExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebrobot Show documentation
Show all versions of jwebrobot Show documentation
Reference implementation of the web automation markup language (WAML).
The newest version!
package website.automate.jwebrobot.executor.action;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.springframework.stereotype.Service;
import website.automate.jwebrobot.context.ScenarioExecutionContext;
import website.automate.jwebrobot.executor.ActionExecutorUtils;
import website.automate.jwebrobot.executor.ActionResult;
import website.automate.waml.io.model.main.action.MoveAction;
@Service
public class MoveActionExecutor extends BaseActionExecutor {
@Override
public void execute(MoveAction action,
ScenarioExecutionContext context,
ActionResult result,
ActionExecutorUtils utils) {
final WebDriver driver = context.getDriver();
final WebElement element = (utils.getWebdriverWaitProvider().getInstance(driver, utils.getTimeoutResolver().resolve(action, context)))
.until(d -> utils.getElementsFilter().filter(context, action));
Actions actions = new Actions(driver);
actions.moveToElement(element).perform();
result.setValue(element);
}
@Override
public Class getSupportedType() {
return MoveAction.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy