Package org.openqa.selenium

Examples of org.openqa.selenium.WebElement


    }

    @Test
    public void column_resize_smaller() {
        browser.get(contextPath.toExternalForm());
        WebElement column1ResizeHandle = header.findElement(By.cssSelector(".rf-edt-hdr .rf-edt-td-column1 .rf-edt-rsz"));

        Actions builder = new Actions(browser);
        final Action dragAndDrop = builder.dragAndDropBy(column1ResizeHandle, -20, 0).build();
        dragAndDrop.perform();
View Full Code Here


    }

    @Test
    public void column_resize_bigger() {
        browser.get(contextPath.toExternalForm());
        WebElement column1ResizeHandle = header.findElement(By.cssSelector(".rf-edt-hdr .rf-edt-td-column1 .rf-edt-rsz"));

        Actions builder = new Actions(browser);
        final Action dragAndDrop = builder.dragAndDropBy(column1ResizeHandle, 20, 0).build();
        dragAndDrop.perform();
View Full Code Here

        Assert.assertEquals("content of tab 6", tabPanel.advanced().getVisibleContent().getText());

        guardAjax(tabs.get(0)).click();
        Assert.assertEquals("content of tab 0",tabPanel.advanced().getVisibleContent().getText());

        WebElement removeLink = tabs.get(6).findElement(By.tagName("a"));
        guardAjax(removeLink).click();
        Assert.assertEquals(6, tabs.size());
    }
View Full Code Here

        guardAjax(a4jCreateTabButton).click();
        guardAjax(a4jCreateTabButton).click();

        Assert.assertEquals(9, tabs.size());

        WebElement removeLink = tabs.get(8).findElement(By.tagName("a"));
        guardAjax(removeLink).click();
        Assert.assertEquals(8, tabs.size());

        removeLink = tabs.get(7).findElement(By.tagName("a"));
        guardAjax(removeLink).click();
View Full Code Here

    @Test
    public void table_sort() throws InterruptedException {
        // given
        browser.get(contextPath.toExternalForm());
        WebElement cell = browser.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-c-cnt")).get(0);
        Assert.assertEquals("3", cell.getText());

        guardAjax(sortHandle).click();
        Thread.sleep(500);
        cell = browser.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-c-cnt")).get(0);
        Assert.assertEquals("0", cell.getText());

        guardAjax(sortHandle).click();
        Thread.sleep(500);
        cell = browser.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-c-cnt")).get(0);
        Assert.assertEquals("9", cell.getText());

        guardAjax(sortHandle).click();
        Thread.sleep(500);
        cell = browser.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-c-cnt")).get(0);
        Assert.assertEquals("0", cell.getText());

    }
View Full Code Here

    protected void submitValue() {
        browser.findElement(By.id("form:out")).click(); //blur
    }

    protected void checkMessage(String messageId, Matcher<String> matcher) {
        WebElement message = browser.findElement(By.id(messageId));
        assertThat(message.getText().trim(), matcher);
    }
View Full Code Here

    @Test
    @Category(Failing.class)
    public void client_side_validation_msg() {
        // given
        browser.get(contextPath.toExternalForm());
        WebElement input = browser.findElement(By.id("myForm:input1"));

        input.sendKeys("RichFaces");
        Graphene.guardNoRequest(input).sendKeys(Keys.TAB);

        WebElement message = browser.findElement(By.id("myForm:msg1"));
        Assert.assertEquals("Validation message", "Input 1: max 4 characters", message.getText());
    }
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

    @Test
    public void check_row_click() throws InterruptedException {
        browser.get(contextPath.toExternalForm());
        guardHttp(form.findElement(By.cssSelector("input[type='submit']"))).click();
        final WebElement firstRowLink = table.findElement(By.cssSelector("a"));

        Warp.initiate(new Activity() {
            @Override
            public void perform() {
                guardHttp(firstRowLink).click();
View Full Code Here

        autocompleteInput.clear();
        autocompleteInput.sendKeys("New ");
        waitGui().until().element(suggestionList).is().visible();
        assertEquals(4, autocompleteItems.size());   
       
        WebElement secondItem = autocompleteItems.get(1);
        actions.moveToElement(secondItem).perform();
        waitGui().until().element(suggestionList).is().visible();
        assertEquals(4, autocompleteItems.size());
       
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.WebElement

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.