Package org.openqa.selenium.support.pagefactory

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


        By[] byArray = new By[findByArray.length];
        for (int i = 0; i < findByArray.length; i++) {
            byArray[i] = buildByFromFindBy(findByArray[i]);
        }

        return new ByAll(byArray);
    }
View Full Code Here


        List<WebElement> radioGroup = Arrays.asList(radioButton, radioButton, radioButton);
        List<WebElement> textInputList = Arrays.asList(textInput, textInput, textInput);
        List<WebElement> htmlElementList = Arrays.asList(htmlElement, htmlElement, htmlElement);
        List<WebElement> webElementList = Arrays.asList(element, element, element);

        when(driver.findElements(new ByAll(By.id(ELEMENT_ID)))).thenReturn(webElementList);
        when(driver.findElements(new ByAll(By.id(ELEMENT_ID), By.id(HTML_ELEMENT_ID))))
                .thenReturn(Arrays.asList(element, element, element, htmlElement, htmlElement, htmlElement));
        when(driver.findElement(new ByAll(By.id(ELEMENT_ID)))).thenReturn(element);
        when(driver.findElement(new ByAll(By.id(HTML_ELEMENT_ID)))).thenReturn(htmlElement);
        when(driver.findElement(new ByAll(By.id(ELEMENT_ID), By.id(HTML_ELEMENT_ID), By.id(BUTTON_ID))))
                .thenReturn(htmlElement);

        return driver;
    }
View Full Code Here

TOP

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

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.