Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlElement.click()


    }

    private void edit(HtmlPage page, String inplaceSelectId, int selectIndex) throws Exception {
        HtmlElement span = page.getFirstByXPath("//*[@id = '" + inplaceSelectId + "']");
        assertNotNull(span);
        span.click();

        HtmlElement edit = page.getFirstByXPath("//*[@id = '" + inplaceSelectId + "Edit']");
        assertNotNull(edit);
        assertEquals("rf-is-fld-cntr", edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));

View Full Code Here


        assertNotNull(list);
        assertTrue(list.isDisplayed());

        HtmlElement item = page.getFirstByXPath("//*[@id = '" + inplaceSelectId + "Item" + selectIndex + "']");
        assertNotNull(item);
        item.click();

        HtmlElement panel = page.getFirstByXPath("//*[@id = 'form:out']");
        panel.click();

        list = page.getFirstByXPath("//*[@id = '" + inplaceSelectId + "List']");
View Full Code Here

        HtmlElement item = page.getFirstByXPath("//*[@id = '" + inplaceSelectId + "Item" + selectIndex + "']");
        assertNotNull(item);
        item.click();

        HtmlElement panel = page.getFirstByXPath("//*[@id = 'form:out']");
        panel.click();

        list = page.getFirstByXPath("//*[@id = '" + inplaceSelectId + "List']");
        assertNotNull(list);
        assertFalse(list.isDisplayed());
    }
View Full Code Here

    }

    private void edit(HtmlPage page, String inplaceInputId, String value) throws Exception {
        HtmlElement span = page.getFirstByXPath("//*[@id = '" + inplaceInputId + "']");
        assertNotNull(span);
        span.click();
        HtmlElement edit = page.getFirstByXPath("//*[@id = '" + inplaceInputId + "Edit']");
        assertNotNull(edit);
        assertEquals("rf-ii-fld-cntr", edit.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
        typeNewValue(page, inplaceInputId, value);
    }
View Full Code Here

        input.type(value);
    }

    private void blur(HtmlPage page) throws Exception {
        HtmlElement panel = page.getFirstByXPath("//*[@id = 'form:panel']");
        panel.click();
    }
}
View Full Code Here

        assertNotNull(panelResizer);
        assertEquals("rf-pp-hndlr rf-pp-hndlr-t", panelResizer.getAttribute("class"));
        assertEquals("cursor: N-resize;", panelResizer.getAttribute("style"));
        List<HtmlElement> result = page.getElementsByName("script");
        HtmlElement button = panelWithFacet.getElementById("button");
        button.click();
        HtmlElement sizeButton = panelWithFacet.getElementById("size");
        sizeButton.click();
        String width = panelContainer.getAttribute("width");
    }
}
View Full Code Here

        assertEquals("cursor: N-resize;", panelResizer.getAttribute("style"));
        List<HtmlElement> result = page.getElementsByName("script");
        HtmlElement button = panelWithFacet.getElementById("button");
        button.click();
        HtmlElement sizeButton = panelWithFacet.getElementById("size");
        sizeButton.click();
        String width = panelContainer.getAttribute("width");
    }
}
View Full Code Here

    }

    @Override
    protected HtmlPage submit(HtmlPage page) throws IOException {
        HtmlElement submit = page.getElementById("form:submit");
        return submit.click();
    }

    @Test
    public void testSubmitTooShortValue() throws Exception {
        HtmlPage page = submitValueAndCheckMessage("", containsString(GraphBean.SHORT_MSG));
View Full Code Here

            HtmlElement input = page.getElementById("form:outer:" + i + ":inner:0:input");
            input.type(Integer.toString(i));
        }

        HtmlElement ajax = page.getElementById("form:ajax");
        page = ajax.click();

        for (int i = 0; i < 3; i++) {
            HtmlElement input = page.getElementById("form:outer:" + i + ":inner:0:input");
            assertEquals(Integer.toString(i), input.getAttribute("value"));
        }
View Full Code Here

            {
                //in case of get-requests it isn't required that the element is in a form
                commandNode = this.currentPage.getHtmlElementById(id);
            }

            this.currentPage = commandNode.click();
            useDefaultForm();

            if(expectedTarget != null)
            {
                assertTrue(url(this.currentPage).contains(expectedTarget));
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.