Package com.gargoylesoftware.htmlunit.html

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


        HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
        stormStrength.setValueAttribute(REDIRECT_STORM_STRENGTH);
        String stormCid = getCid(storm);
        // Submit value and redirect to the next form
        HtmlSubmitInput lighteningButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "lighteningButton");
        HtmlPage lightening = lighteningButton.click();

        assertTrue(lightening.getWebResponse().getRequestUrl().toString().contains("lightening.jsf"));
        assertEquals(stormCid, getCid(lightening));
        stormStrength = getFirstMatchingElement(lightening, HtmlTextInput.class, "stormStrength");
        assertEquals(stormStrength.getValueAttribute(), REDIRECT_STORM_STRENGTH);
View Full Code Here


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

        // Begin long-running conversation - note that we use ajax
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
                "beginConversationButton");
        storm = beginConversationButton.click();
        String cid = getFirstMatchingElement(storm, HtmlInput.class, "conversationId").getValueAttribute();
        assertFalse(cid.isEmpty());

        // Set input value
        HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
View Full Code Here

        // Set input value
        HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
        stormStrength.setValueAttribute(AJAX_STORM_STRENGTH);
        // Submit value - note that we use ajax
        HtmlSubmitInput thunderButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "thunderButton");
        thunderButton.click();

        HtmlPage thunder = webClient.getPage(getPath("thunder.jsf", cid));
        stormStrength = getFirstMatchingElement(thunder, HtmlTextInput.class, "stormStrength");
        assertEquals(stormStrength.getValueAttribute(), AJAX_STORM_STRENGTH);
    }
View Full Code Here

        WebClient webClient = new WebClient();

        HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
                "beginConversationButton");
        storm = beginConversationButton.click();

        String c1 = getCid(storm);

        HtmlPage cloud = webClient.getPage(getPath("cloud.jsf", c1));
View Full Code Here

    log("Clicking button '" + formId + ":" + buttonId + "'");
    HtmlForm form = htmlPage().getFormByName(formId);
    HtmlSubmitInput button = (HtmlSubmitInput) form
        .getInputByName(buttonId);
    try {
      page = button.click();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

    public void testManualCidPropagation() throws Exception {
        WebClient webClient = new WebClient();
        HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
                "beginConversationButton");
        storm = beginConversationButton.click();

        String c1 = getCid(storm);

        HtmlPage cloud = webClient.getPage(getPath("cloud.jsf", c1));
View Full Code Here

    public void testConversationIdSetByContainerIsUnique() throws Exception {
        WebClient client = new WebClient();
        HtmlPage storm = client.getPage(getPath("storm.jsf"));
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
                "beginConversationButton");
        storm = beginConversationButton.click();

        String c1 = getCid(storm);

        storm = client.getPage(getPath("storm.jsf"));
        beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
View Full Code Here

        String c1 = getCid(storm);

        storm = client.getPage(getPath("storm.jsf"));
        beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
        storm = beginConversationButton.click();

        String c2 = getCid(storm);

        assert !c1.equals(c2);
    }
View Full Code Here

    public void testLongRunningConversationInstancesNotDestroyedAtRequestEnd() throws Exception {
        WebClient client = new WebClient();
        HtmlPage storm = client.getPage(getPath("storm.jsf"));
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
                "beginConversationButton");
        storm = beginConversationButton.click();

        resetCloud(client);

        client.getPage(getPath("cloud.jsf", getCid(storm)));
        assert !isCloudDestroyed(client);
View Full Code Here

        HtmlPage rain = client.getPage(getPath("rain.jsf"));

        // begin a conversation
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(rain, HtmlSubmitInput.class,
                "beginConversationButton");
        rain = beginConversationButton.click();
        String cid = getCid(rain);

        // Cause rain
        HtmlSubmitInput rainButton = getFirstMatchingElement(rain, HtmlSubmitInput.class, "rain");
        rain = rainButton.click();
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.