Package com.gargoylesoftware.htmlunit.html

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


        assert !isLongRunning(page);

        // begin a conversation
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(page, HtmlSubmitInput.class,
                "beginConversationButton");
        page = beginConversationButton.click();
        assert isLongRunning(page);

        // end a conversation
        HtmlSubmitInput endConversationButton = getFirstMatchingElement(page, HtmlSubmitInput.class, "endConversationButton");
        page = endConversationButton.click();
View Full Code Here


        page = beginConversationButton.click();
        assert isLongRunning(page);

        // end a conversation
        HtmlSubmitInput endConversationButton = getFirstMatchingElement(page, HtmlSubmitInput.class, "endConversationButton");
        page = endConversationButton.click();
        assert !isLongRunning(page);
    }

    @Test(groups = { CONTEXTS })
    @SpecAssertion(section = "6.7.5", id = "q")
View Full Code Here

        assert !isLongRunning(page);

        // try ending a transient conversation
        HtmlSubmitInput endConversationButton = getFirstMatchingElement(page, HtmlSubmitInput.class,
                "endConversationAndSwallowException");
        page = endConversationButton.click();
        assert page.getBody().getTextContent().contains("Hello world!");
    }

    @Test(groups = { CONTEXTS })
    @SpecAssertions({ @SpecAssertion(section = "6.7.5", id = "ib"), @SpecAssertion(section = "6.7.5", id = "iaa") })
View Full Code Here

        assertFalse(isLongRunning(page));

        // begin a conversation
        HtmlSubmitInput beginConversationButton = (HtmlSubmitInput) page
                .getElementById("form:beginConversationIdentifiedByCustomIdentifier");
        page = beginConversationButton.click();
        assertTrue(isLongRunning(page));
        assertEquals(getCid(page), "humilis");
        assertTrue(page.getBody().getTextContent().contains("Cumulus humilis"));

        HtmlPage nextPage = client.getPage(getPath("cumulus.jsf?cid=humilis"));
View Full Code Here

        assert !isLongRunning(page);

        // begin a conversation
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(page, HtmlSubmitInput.class,
                "beginConversationButton");
        page = beginConversationButton.click();
        assert isLongRunning(page);
        assert getCid(page) != null;
        assert page.getBody().getTextContent().contains("Cumulus congestus");
    }
View Full Code Here

        assert !isLongRunning(page);

        // begin a conversation and set a custom timeout
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(page, HtmlSubmitInput.class,
                "beginConversationAndSetTimeout");
        page = beginConversationButton.click();
        assert page.getBody().getTextContent().contains("Cumulonimbus");
    }

    @Test
    @SpecAssertion(section = "6.7.5", id = "m")
View Full Code Here

        assert !isLongRunning(page);

        // begin a conversation
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(page, HtmlSubmitInput.class,
                "beginConversationButton");
        page = beginConversationButton.click();
        assert page.getBody().getTextContent().contains("Stratocumulus");
    }

    @Test
    @SpecAssertion(section = "6.7.4", id = "oa")
View Full Code Here

        HtmlPage storm = webClient.getPage(getPath("storm.jsf"));

        // Begin long-running conversation
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
                "beginConversationButton");
        storm = beginConversationButton.click();
        // Set input value
        HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
        stormStrength.setValueAttribute(STORM_STRENGTH);
        String stormCid = getCid(storm);
        // Submit value and forward to the next form
View Full Code Here

        HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
        stormStrength.setValueAttribute(STORM_STRENGTH);
        String stormCid = getCid(storm);
        // Submit value and forward to the next form
        HtmlSubmitInput thunderButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "thunderButton");
        HtmlPage thunder = thunderButton.click();

        assertEquals(stormCid, getCid(thunder));
        stormStrength = getFirstMatchingElement(thunder, HtmlTextInput.class, "stormStrength");
        assertEquals(stormStrength.getValueAttribute(), STORM_STRENGTH);
    }
View Full Code Here

        HtmlPage storm = webClient.getPage(getPath("storm.jsf"));

        // Begin long-running conversation
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
                "beginConversationButton");
        storm = beginConversationButton.click();
        // Set input value
        HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
        stormStrength.setValueAttribute(REDIRECT_STORM_STRENGTH);
        String stormCid = getCid(storm);
        // Submit value and redirect to the next form
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.