Package org.openqa.selenium

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


    public List<WebElement> getExistingTemplatesLinks()
    {
        WebElement availableTemplatesHeader = getDriver().findElement(By.id("HAvailableTemplateProviders"));
        // a bit unreliable here, but it's the best I can do
        WebElement ul = availableTemplatesHeader.findElement(By.xpath("following-sibling::node()"));
        return ul.findElements(By.tagName("a"));
    }
}
View Full Code Here


    }

    private List<WebElement> getAllRows() {
        WebElement table = vaadinElement("/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]");
        return table.findElements(By.cssSelector(".v-table-table tr"));

    }
}
View Full Code Here

    @Test
    public void check_column_classes() throws InterruptedException {
        browser.get(contextPath.toExternalForm());

        WebElement body = browser.findElement(By.id("myForm:edt:body"));
        List<WebElement> cells = body.findElements(By.cssSelector("#myForm\\:edt\\:0\\:n td"));

        Assert.assertTrue(cells.get(0).getAttribute("class").contains("c1"));
        Assert.assertTrue(cells.get(0).getAttribute("class").contains("d1"));
        Assert.assertTrue(cells.get(1).getAttribute("class").contains("c2"));
        Assert.assertTrue(cells.get(1).getAttribute("class").contains("d2"));
View Full Code Here

        browser.get(contextPath.toExternalForm());

        browser.findElements(By.className("rf-edt-flt-i"));

        WebElement tableHeader = browser.findElement(By.className("rf-edt-hdr"));
        List<WebElement> column2BuiltinFilter = tableHeader.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-flt-i"));
        Assert.assertEquals("Built-in filter for column2 should be present", 1, column2BuiltinFilter.size());
        List<WebElement> column3BuiltinFilter = tableHeader.findElements(By.cssSelector(".rf-edt-c-column3 .rf-edt-flt-i"));
        Assert.assertEquals("Built-in filter for column3 is should not be present", 0, column3BuiltinFilter.size());
    }
View Full Code Here

        browser.findElements(By.className("rf-edt-flt-i"));

        WebElement tableHeader = browser.findElement(By.className("rf-edt-hdr"));
        List<WebElement> column2BuiltinFilter = tableHeader.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-flt-i"));
        Assert.assertEquals("Built-in filter for column2 should be present", 1, column2BuiltinFilter.size());
        List<WebElement> column3BuiltinFilter = tableHeader.findElements(By.cssSelector(".rf-edt-c-column3 .rf-edt-flt-i"));
        Assert.assertEquals("Built-in filter for column3 is should not be present", 0, column3BuiltinFilter.size());
    }

    @Test
    public void check_filter_is_cleared() throws InterruptedException {
View Full Code Here

        actions.moveByOffset(50, 50);
        actions.perform();

        WebElement dragElement = driver.findElement(By
                .className("v-drag-element"));
        List<WebElement> children = dragElement.findElements(By.xpath(".//*"));
        boolean found = false;
        for (WebElement child : children) {
            if ("text".equals(child.getAttribute("value"))) {
                found = true;
            }
View Full Code Here

     * @param expected
     *            the expected alternate text, cannot be null
     */
    private void assertAltText(String buttonId, String expected) {
        WebElement button = vaadinElementById(buttonId);
        List<WebElement> imgList = button.findElements(By.xpath(".//img"));
        if (imgList.isEmpty()) {
            return;
        }
        WebElement img = imgList.get(0);
        String alt = img.getAttribute("alt");
View Full Code Here

        assertFalse(scrollPosition.isDisplayed());
    }

    private List<WebElement> getCellsOfFirstColumn() {
        WebElement table = vaadinElementById(TABLE);
        List<WebElement> firstCellOfRows = table.findElements(By
                .cssSelector(".v-table-table tr > td"));
        return firstCellOfRows;
    }
}
View Full Code Here

        comboBox.findElement(By.className("v-filterselect-button")).click();
        waitForPopup(comboBox);
        WebElement comboBoxPopup = vaadinElement("/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
                + indexToTest + "]/VFilterSelect[0]#popup");
        comboBoxPopup.findElements(By.tagName("td")).get(2).click();

        // Select an element from the second (to focus) combobox to remove
        // focus from the first combobox

        comboBoxFocus.findElement(By.className("v-filterselect-button"))
View Full Code Here

        comboBoxFocus.findElement(By.className("v-filterselect-button"))
                .click();
        waitForPopup(comboBoxFocus);
        comboBoxPopup = vaadinElement("/VVerticalLayout[0]/Slot[2]/VVerticalLayout[0]/Slot["
                + indexToFocus + "]/VFilterSelect[0]#popup");
        comboBoxPopup.findElements(By.tagName("td")).get(2).click();

        // click the button of the first combobox. This would reveal the
        // unwanted behaviour.

        comboBox.findElement(By.className("v-filterselect-button")).click();
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.