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

org.fluentlenium.core.proxy.ElementInstanceLocator Maven / Gradle / Ivy

package org.fluentlenium.core.proxy;

import org.fluentlenium.utils.SupplierOfInstance;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.WrapsElement;

/**
 * {@link org.openqa.selenium.support.pagefactory.ElementLocator} for an already found {@link WebElement} instance.
 */
public class ElementInstanceLocator extends ElementSupplierLocator implements WrapsElement {

    /**
     * Creates a new element instance locator
     *
     * @param element element instance
     */
    public ElementInstanceLocator(WebElement element) {
        super(new SupplierOfInstance<>(element));
    }

    public WebElement getWrappedElement() {
        return findElement();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy