Examples of HtmlSpan


Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    /**
     * <p>Verify the presence and contents of several message components.</p>
     */
    public void testMessage() throws Exception {

        HtmlSpan span = null;

        span = (HtmlSpan) element("message-direct");
        assertNotNull(span);
        assertEquals("Resource Simple Text", span.asText());

        span = (HtmlSpan) element("message-indirect");
        assertNotNull(span);
        assertEquals("Resource Simple Text", span.asText());

        span = (HtmlSpan) element("message-filtered");
        assertNotNull(span);
        assertEquals("Resource <b>Filtered</b> Text", span.asText());

        span = (HtmlSpan) element("message-unfiltered");
        assertNotNull(span);
        assertEquals("Resource Unfiltered Text", span.asText());

        span = (HtmlSpan) element("message-substitute");
        assertNotNull(span);
        assertEquals("From Here to Eternity", span.asText());

    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    /**
     * <p>Verify the proper operation of clientId in a subview.</p.
     */
    public void testSubview() throws Exception {

        HtmlSpan span = null;

        span = (HtmlSpan) element("subview:write1");
        assertNotNull(span);
        assertEquals("subview:write1", span.asText());

    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    /**
     * <p>Verify the presence and contents of several write components.</p>
     */
    public void testWrite() throws Exception {

        HtmlSpan span = null;

        span = (HtmlSpan) element("write-literal");
        assertNotNull(span);
        assertEquals("Literal Write Content", span.asText());

        span = (HtmlSpan) element("write-filtered");
        assertNotNull(span);
        assertEquals("Literal <b>Filtered</b> Content", span.asText());

        span = (HtmlSpan) element("write-unfiltered");
        assertNotNull(span);
        assertEquals("Literal Unfiltered Content", span.asText());

        span = (HtmlSpan) element("retrieved-literal");
        assertNotNull(span);
        assertEquals("Retrieved Simple Content", span.asText());

        span = (HtmlSpan) element("retrieved-filtered");
        assertNotNull(span);
        assertEquals("Retrieved <b>Filtered</b> Content", span.asText());

        span = (HtmlSpan) element("retrieved-unfiltered");
        assertNotNull(span);
        assertEquals("Retrieved Unfiltered Content", span.asText());

    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    /**
     * <p>Submit incorrect input fields and verify the correct response.</p>
     */
    public void testIncorrect() throws Exception {

        HtmlSpan span = null;
        HtmlTextInput username = (HtmlTextInput) element("form:username");
        HtmlPasswordInput password = (HtmlPasswordInput)
            element("form:password");
        HtmlSubmitInput submit = (HtmlSubmitInput) element("form:submit");

        username.setValueAttribute("bb");
        password.setValueAttribute("");
        submit(submit);

        assertEquals("logon", title());

        span = (HtmlSpan) element("globalErrors");
        assertNotNull(span);
        assertEquals("[EH][EP] can not be less than 3 characters.[ES]" +
                     "[EP] is required.[ES][EF]",
                     span.asText());

        username = (HtmlTextInput) element("form:username");
        assertNotNull(username);
        assertEquals("bb", username.getValueAttribute());

        span = (HtmlSpan) element("form:usernameErrors");
        assertNotNull(span);
        // FIXME:  response string should really include "Username:"
        assertEquals("[EH][EP] can not be less than 3 characters.[ES][EF]",
                     span.asText());

        password = (HtmlPasswordInput) element("form:password");
        assertNotNull(password);
        assertEquals("", password.getValueAttribute());

        span = (HtmlSpan) element("form:passwordErrors");
        assertNotNull(span);
        // FIXME:  response string should really include "Password:"
        assertEquals("[EH][EP] is required.[ES][EF]", span.asText());

    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    * @throws IOException
    */
   public void setInplaceInput( String componentID, String value, String customSaveID ) throws IOException
   {
      // Find outside span control
      HtmlSpan span = (HtmlSpan)jsfClient.getElement(componentID);
      // Find text control
      HtmlTextInput input = (HtmlTextInput)jsfClient.getElement(componentID+"tempValue");

      // Activate control - click on outside table control
      span.click();

      // Type value into input control
      input.type(value);

      // Type #3 - CUSTOM save button
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    @Test
    @SpecAssertion(section = CONVERSATION_CONTEXT, id = "a")
    public void testConversationActiveDuringNonFacesRequest() throws Exception {
        WebClient client = new WebClient();
        HtmlPage page = client.getPage(getPath("cloud.jsf"));
        HtmlSpan span = getFirstMatchingElement(page, HtmlSpan.class, "cloudName");
        assert span.getTextContent().equals(Cloud.NAME);
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    public void testNameLessCharacters() throws IOException {
        nameInputText.setText("ab");
        ageInputText.setText("20");
        zipInputText.setText("12345");
        HtmlPage result = button.click();
        HtmlSpan span = (HtmlSpan)result.getElementById("nameMessage");
        assertEquals("At least 3 characters", span.asText());
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    public void testNameBoundary() throws IOException {
        nameInputText.setText("abc");
        ageInputText.setText("20");
        zipInputText.setText("12345");
        HtmlPage result = button.click();
        HtmlSpan span = (HtmlSpan)result.getElementById("nameMessage");
        assertEquals("", span.asText());
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    public void testAgeLessThan() throws IOException {
        nameInputText.setText("abc");
        ageInputText.setText("16");
        zipInputText.setText("12345");
        HtmlPage result = button.click();
        HtmlSpan span = (HtmlSpan)result.getElementById("ageMessage");
        assertEquals("must be greater than or equal to 18", span.asText());
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlSpan

    public void testAgeLowBoundary() throws IOException {
        nameInputText.setText("abc");
        ageInputText.setText("18");
        zipInputText.setText("12345");
        HtmlPage result = button.click();
        HtmlSpan span = (HtmlSpan)result.getElementById("ageMessage");
        assertEquals("", span.asText());
    }
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.