Package org.openqa.selenium.support.pagefactory

Examples of org.openqa.selenium.support.pagefactory.ElementLocator


     */
    public static void populateHtmlElement(HtmlElement htmlElement, CustomElementLocatorFactory locatorFactory) {
        @SuppressWarnings("unchecked")
        Class<HtmlElement> htmlElementClass = (Class<HtmlElement>) htmlElement.getClass();
        // Create locator that will handle Block annotation
        ElementLocator locator = locatorFactory.createLocator(htmlElementClass);
        ClassLoader htmlElementClassLoader = htmlElement.getClass().getClassLoader();
        // Initialize block with WebElement proxy and set its name
        String elementName = getElementName(htmlElementClass);
        WebElement elementToWrap = HtmlElementFactory.createNamedProxyForWebElement(htmlElementClassLoader,
                locator, elementName);
View Full Code Here


    public Object decorate(ClassLoader loader, Field field) {
        if (!isDecoratableField(field)) {
            return null;
        }

        ElementLocator locator = factory.createLocator(field);
        if (locator == null) {
            return null;
        }

        String elementName = getElementName(field);
View Full Code Here

    public Object decorate(ClassLoader loader, Field field) {
        if (!(WebElement.class.isAssignableFrom(field.getType()) || isDecoratableList(field))) {
            return null;
        }
        ElementLocator locator = factory.createLocator(field);
        if (locator == null) {
            return null;
        }

        Class<?> fieldType = field.getType();
View Full Code Here

TOP

Related Classes of org.openqa.selenium.support.pagefactory.ElementLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.