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

org.selophane.elements.base.Fragment Maven / Gradle / Ivy

There is a newer version: 0.12
Show newest version
package org.selophane.elements.base;

import org.openqa.selenium.support.PageFactory;
import org.selophane.elements.factory.api.ChainedElementLocatorFactory;
import org.selophane.elements.factory.api.ElementDecorator;

/**
 * Baseclass of a fragment which handles the initialization.
 *
 */
public class Fragment extends ElementImpl {

    /**
     *
     * Initiates an fragment.
     *
     * @param elementLocator the locator of the webelement.
     */
    public Fragment(final UniqueElementLocator elementLocator) {
        super(elementLocator);
        PageFactory.initElements(
                new ElementDecorator(elementLocator.getWebDriver(),
                        new ChainedElementLocatorFactory(elementLocator),
                        elementLocator.getPageName(),
                        elementLocator.getFieldDescription()),
                this);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy