Package org.openqa.selenium

Examples of org.openqa.selenium.WebElement.findElement()


    private WebElement getSecondChild() {
        WebElement container = getDriver()
                .findElement(
                        By.xpath("//div[contains(@class,'v-splitpanel-second-container')]"));
        return container.findElement(By
                .xpath("//div[contains(@class, 'v-button')]"));
    }

}
View Full Code Here


        String selection = itemNames[itemNames.length - 1];
        for (String itemName : nestedItemnames) {
            WebElement lastMenuItem = secondMenuBar.findElement(By.vaadin("#"
                    + selection));
            lastMenuItem.click();
            lastMenuItem.findElement(By.vaadin("#" + itemName)).click();
            waitUntil(ExpectedConditions.textToBePresentInElement(
                    label.getWrappedElement(), itemName));
        }
    }
}
View Full Code Here

                "unexpected month",
                "tammikuu 2011",
                popup.findElements(
                        By.className("v-datefield-calendarpanel-month")).get(1)
                        .getText());
        List<WebElement> headerElements = popup.findElement(
                By.className("v-datefield-calendarpanel-weekdays"))
                .findElements(By.tagName("td"));
        List<WebElement> weekdays = new ArrayList<WebElement>();
        for (WebElement headerElement : headerElements) {
            if ("columnheader".equals(headerElement.getAttribute("role"))) {
View Full Code Here

                        By.className("v-datefield-calendarpanel-weeknumber"))
                        .size());
        assertEquals(
                "unexpected selection",
                "1",
                popup.findElement(
                        By.className("v-datefield-calendarpanel-day-selected"))
                        .getText());
        assertEquals(
                "unexpected focus",
                "1",
View Full Code Here

                        By.className("v-datefield-calendarpanel-day-selected"))
                        .getText());
        assertEquals(
                "unexpected focus",
                "1",
                popup.findElement(
                        By.className("v-datefield-calendarpanel-day-focused"))
                        .getText());
        List<WebElement> days = popup.findElements(By
                .className("v-datefield-calendarpanel-day"));
        assertEquals("unexpected day count", 42, days.size());
View Full Code Here

        assertEquals("unexpected day content", "4", days.get(8).getText());
        assertEquals("unexpected day content", "21", days.get(25).getText());
        assertEquals("unexpected day content", "6", days.get(41).getText());

        // move to the previous month
        popup.findElement(By.className("v-datefield-calendarpanel-prevmonth"))
                .findElement(By.tagName("button")).click();

        // verify contents
        assertEquals(
                "unexpected month",
View Full Code Here

                        By.className("v-datefield-calendarpanel-month")).get(1)
                        .getText());
        assertEquals(
                "unexpected selection",
                "1",
                popup.findElement(
                        By.className("v-datefield-calendarpanel-day-selected"))
                        .getText());
        assertEquals(
                "unexpected focus",
                0,
View Full Code Here

        assertEquals("unexpected day content", "7", days.get(8).getText());
        assertEquals("unexpected day content", "24", days.get(25).getText());
        assertEquals("unexpected day content", "9", days.get(41).getText());

        // move to the previous year
        popup.findElement(By.className("v-datefield-calendarpanel-prevyear"))
                .findElement(By.tagName("button")).click();

        // verify contents
        assertEquals(
                "unexpected month",
View Full Code Here

                "unexpected month",
                "February 2010",
                popup.findElements(
                        By.className("v-datefield-calendarpanel-month")).get(1)
                        .getText());
        List<WebElement> headerElements = popup.findElement(
                By.className("v-datefield-calendarpanel-weekdays"))
                .findElements(By.tagName("td"));
        List<WebElement> weekdays = new ArrayList<WebElement>();
        for (WebElement headerElement : headerElements) {
            if ("columnheader".equals(headerElement.getAttribute("role"))) {
View Full Code Here

                        By.className("v-datefield-calendarpanel-weeknumber"))
                        .size());
        assertEquals(
                "unexpected selection",
                "16",
                popup.findElement(
                        By.className("v-datefield-calendarpanel-day-selected"))
                        .getText());
        assertEquals(
                "unexpected focus",
                "16",
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.