All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.magentys.webdriver.missions.Locate Maven / Gradle / Ivy

package io.magentys.webdriver.missions;

import io.magentys.Agent;
import io.magentys.Mission;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.WebDriver;

public class Locate implements Mission {

    private final By by;

    public Locate(final By by){
        this.by = by;
    }

    @Override
    public WebElement accomplishAs(Agent agent) {
        WebDriver webDriver = agent.usingThe(WebDriver.class);
        return webDriver.findElement(by);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy