Package org.openqa.selenium.support

Examples of org.openqa.selenium.support.FindBys


    public By buildBy() {
        assertValidAnnotations();

        By ans = null;

        FindBys findBys = field.getAnnotation(FindBys.class);
        if (ans == null && findBys != null) {
            ans = buildByFromFindBys(findBys);
        }

        FindAll findAll = field.getAnnotation(FindAll.class);
View Full Code Here


    protected By buildByFromDefault() {
        return new ByIdOrName(field.getName());
    }

    protected void assertValidAnnotations() {
        FindBys findBys = field.getAnnotation(FindBys.class);
        FindAll findAll = field.getAnnotation(FindAll.class);
        FindBy findBy = field.getAnnotation(FindBy.class);
        if (findBys != null && findBy != null) {
            throw new IllegalArgumentException("If you use a '@FindBys' annotation, " +
                    "you must not also use a '@FindBy' annotation");
View Full Code Here

        }
    }

    private By buildByFromFindAnnotations() {
        if (getField().isAnnotationPresent(FindBys.class)) {
            FindBys findBys = getField().getAnnotation(FindBys.class);
            return buildByFromFindBys(findBys);
        }

        if (getField().isAnnotationPresent(FindAll.class)) {
            FindAll findBys = getField().getAnnotation(FindAll.class);
View Full Code Here

        By by = null;

        by = checkAndProcessEmptyFindBy();

        FindBys webDriverFindBys =
                field.getAnnotation(FindBys.class);
        if (by == null && webDriverFindBys != null) {
            by = buildByFromFindBys(webDriverFindBys);
        }
View Full Code Here

        // Fall through
        return null;
    }

    private void assertValidAnnotations() {
        FindBys findBys = field.getAnnotation(FindBys.class);

        FindBy findBy = field.getAnnotation(FindBy.class);

        if (findBys != null && findBy != null) {
            throw new IllegalArgumentException("If you use a '@FindBys' annotation, "
View Full Code Here

        super(field);
        this.field = field;
    }

    private void assertValidAnnotations() {
        FindBys findBys = field.getAnnotation(FindBys.class);
        FindBy myFindBy = field.getAnnotation(FindBy.class);
        if (findBys != null && myFindBy != null) {
            throw new IllegalArgumentException("If you use a '@FindBys' annotation, "
                    + "you must not also use a '@FindBy' annotation");
        }
View Full Code Here

        if (ans == null && myFindBy != null) {
            ans = buildByFromFindBy(myFindBy);
        }


        FindBys findBys = field.getAnnotation(FindBys.class);
        if (ans == null && findBys != null) {
            ans = buildByFromFindBys(findBys);
        }

View Full Code Here

TOP

Related Classes of org.openqa.selenium.support.FindBys

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.