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

net.serenitybdd.core.pages.ResolvedWebElementResolver Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
package net.serenitybdd.core.pages;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import java.util.Collections;
import java.util.List;

public class ResolvedWebElementResolver extends WebElementResolver {
    private final WebElement webElement;

    public ResolvedWebElementResolver(WebElement webElement) {
        this.webElement = webElement;
    }

    @Override
    public WebElement resolveForDriver(WebDriver driver) {
        return webElement;
    }

    @Override
    public List resolveAllForDriver(WebDriver driver) {
        return Collections.singletonList(webElement);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy