Package com.gargoylesoftware.htmlunit.html

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


    }

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

    @Test
    public void testSubmitTooShortValue() throws Exception {
        HtmlPage page = submitValueAndCheckMessage("", containsString(GraphBean.SHORT_MSG));
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

        // outer gets unfolded, but inner should be still folded
        outer.click();
        assertFalse(field.isDisplayed());
        // now click inner, to reveal the field
        inner.click();
        assertTrue(field.isDisplayed());

        // folding outer should hide everything
        outer.click();
        assertFalse(field.isDisplayed());
View Full Code Here

        Calendar calendar = Calendar.getInstance();
        calendar.set(CalendarBean.CURRENT_YEAR, CalendarBean.CURRENT_MONTH, CalendarBean.CURRENT_DAY);
        String month = calendar.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.US);
        assertTrue(calendarHeaderElement.asText().indexOf(month) > -1);

        page = div.click();

        // After click
        calendar.add(Calendar.MONTH, 1);
        month = calendar.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.US);
        assertTrue(calendarHeaderElement.asText().indexOf(month) > -1);
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<DomElement> result = page.getElementsByName("script");
        HtmlElement button = page.getHtmlElementById("button");
        button.click();
        HtmlElement sizeButton = page.getHtmlElementById("size");
        sizeButton.click();
        String width = panelContainer.getAttribute("width");
    }
}
View Full Code Here

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

        // dataScroller inside dataTable 'footer' facet
        String secondScrollerId = "richTable:scroller2";

        HtmlElement last = getLastButton(page, firstScrollerId);
        last.click();
        checkLastPageButtons(page, firstScrollerId, secondScrollerId);

        HtmlElement first = getFirstButton(page, firstScrollerId);
        first.click();
        checkFirstPageButtons(page, firstScrollerId, secondScrollerId);
View Full Code Here

        HtmlElement last = getLastButton(page, firstScrollerId);
        last.click();
        checkLastPageButtons(page, firstScrollerId, secondScrollerId);

        HtmlElement first = getFirstButton(page, firstScrollerId);
        first.click();
        checkFirstPageButtons(page, firstScrollerId, secondScrollerId);
    }

    @Test
    @Ignore // broke with the jQuery 1.6.2 upgrade
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.