Package com.gargoylesoftware.htmlunit.html

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


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

        for (int i = 2; i <= 5; i++) {
            HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
            currentDigital1.click();

            currentDigital1 = getDigitalButton(page, firstScrollerId, i);
            assertEquals("span", currentDigital1.getNodeName());
            assertEquals("rf-ds-nmb-btn rf-ds-act", currentDigital1.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
View Full Code Here


        checkLastPageButtons(page, firstScrollerId, secondScrollerId);

        // scroll back
        for (int i = 4; i >= 1; i--) {
            HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
            currentDigital1.click();

            currentDigital1 = getDigitalButton(page, firstScrollerId, i);
            assertEquals("span", currentDigital1.getNodeName());
            assertEquals("rf-ds-nmb-btn rf-ds-act", currentDigital1.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
View Full Code Here

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

        for (int i = 2; i <= 5; i++) {
            HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
            currentDigital2.click();

            currentDigital2 = getDigitalButton(page, secondScrollerId, i);
            assertEquals("span", currentDigital2.getNodeName());
            assertEquals("rf-ds-nmb-btn rf-ds-act", currentDigital2.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
View Full Code Here

        checkLastPageButtons(page, firstScrollerId, secondScrollerId);

        // scroll back
        for (int i = 4; i >= 1; i--) {
            HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
            currentDigital2.click();

            currentDigital2 = getDigitalButton(page, secondScrollerId, i);
            assertEquals("span", currentDigital2.getNodeName());
            assertEquals("rf-ds-nmb-btn rf-ds-act", currentDigital2.getAttribute(HtmlConstants.CLASS_ATTRIBUTE).trim());
View Full Code Here

  @Override
  public void clickElement(String linkId) {
    log("Clicking element '" + linkId + "'");
    HtmlElement link = htmlPage().getElementById(linkId);
    try {
      page = link.click();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
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

        HtmlElement button = (HtmlElement) authorizationPage.createElement("button");
        button.setAttribute("type", "submit");
        form.appendChild(button);
        // HtmlButton button = form.getButtonByName("wp-submit");

        final HtmlPage confirmPage = button.click();
        form = confirmPage.getFormByName("loginform");

        button = (HtmlElement) confirmPage.createElement("button");
        button.setAttribute("type", "submit");
        form.appendChild(button);
View Full Code Here

        button = (HtmlElement) confirmPage.createElement("button");
        button.setAttribute("type", "submit");
        form.appendChild(button);
        // button = form.getButtonByName("wp-submit");

        final HtmlPage callbackPage = button.click();
        final String callbackUrl = callbackPage.getUrl().toString();
        logger.debug("callbackUrl : {}", callbackUrl);
        return callbackUrl;
    }
View Full Code Here


        page.getHtmlElementById("storeTab").click();
        webClient.waitForBackgroundJavaScript(500);
        HtmlElement storeButton = page.getHtmlElementById("storeButton");
        storeButton.click();
        webClient.waitForBackgroundJavaScript(2000);
        String result = page.getElementById("storeDiv").getTextContent();

        assertThat(result, containsString("Coverage data stored at " + new File(getReportDir()).getPath()));
View Full Code Here

    private void storeReport(WebClient webClient, HtmlPage page) throws IOException {
        page.getHtmlElementById("storeTab").click();
        webClient.waitForBackgroundJavaScript(500);
        HtmlElement storeButton = page.getHtmlElementById("storeButton");
        storeButton.click();
        webClient.waitForBackgroundJavaScript(2000);
        String result = page.getElementById("storeDiv").getTextContent();

        assertThat(result, containsString("Coverage data stored at " + new File(reportDir).getPath()));
    }
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.