Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlHeading3


        assertEquals( "mono", tt.asText().trim() );

        div = (HtmlDivision) elementIterator.next();
        assertEquals( "section", div.getAttribute( "class" ) );

        HtmlHeading3 h3 = (HtmlHeading3) elementIterator.next();
        assertNotNull( h3 );
        // Note: htmlunit strips the white space, actual result is ok
        assertEquals( "SubSection formatting: italicboldmono", h3.asText().trim() );

        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "SubSection_formatting:_italic_bold_mono", a.getAttribute( "name" ) );

        italic = (HtmlItalic) elementIterator.next();
View Full Code Here


        assertEquals( "Section_formatting:_italic_bold_mono", a.getAttribute( "name" ) );

        div = (HtmlDivision) elementIterator.next();
        assertEquals( "section", div.getAttribute( "class" ) );

        HtmlHeading3 h3 = (HtmlHeading3) elementIterator.next();
        assertNotNull( h3 );
        // Note: htmlunit strips the white space, actual result is ok
        assertEquals( "SubSection formatting: italicboldmono", h3.asText().trim() );

        italic = (HtmlItalic) elementIterator.next();
        assertEquals( "i", italic.getTagName() );
        assertEquals( "italic", italic.asText().trim() );
View Full Code Here

        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "Section_without_id", a.getAttribute( "name" ) );

        div = (HtmlDivision) elementIterator.next();
        assertEquals( "section", div.getAttribute( "class" ) );
        HtmlHeading3 h3 = (HtmlHeading3) elementIterator.next();
        assertEquals( "Subsection without id", h3.asText().trim() );
        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "Subsection_without_id", a.getAttribute( "name" ) );

        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "section-id", a.getAttribute( "name" ) );
        div = (HtmlDivision) elementIterator.next();
        assertEquals( "section", div.getAttribute( "class" ) );
        h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( "Section with id", h2.asText().trim() );
        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "Section_with_id", a.getAttribute( "name" ) );

        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "subsection-id", a.getAttribute( "name" ) );
        div = (HtmlDivision) elementIterator.next();
        assertEquals( "section", div.getAttribute( "class" ) );
        h3 = (HtmlHeading3) elementIterator.next();
        assertEquals( "Subsection with id", h3.asText().trim() );
        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "Subsection_with_id", a.getAttribute( "name" ) );

        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "foo", a.getAttribute( "name" ) );
        div = (HtmlDivision) elementIterator.next();
        assertEquals( "bar", div.getAttribute( "class" ) );
        assertEquals( "foo", div.getAttribute( "id" ) );
        h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( "Section name", h2.asText().trim() );
        assertEquals( "", h2.getAttribute( "class" ) );
        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "Section_name", a.getAttribute( "name" ) );

        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "subfoo", a.getAttribute( "name" ) );
        div = (HtmlDivision) elementIterator.next();
        assertEquals( "subbar", div.getAttribute( "class" ) );
        assertEquals( "subfoo", div.getAttribute( "id" ) );
        h3 = (HtmlHeading3) elementIterator.next();
        assertEquals( "Subsection name", h3.asText().trim() );
        assertEquals( "", h3.getAttribute( "class" ) );
        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "Subsection_name", a.getAttribute( "name" ) );

        assertFalse( elementIterator.hasNext() );
    }
View Full Code Here

        assertNotNull( a );
        assertEquals( a.getAttribute( "name" ), "Entities" );

        div = (HtmlDivision) elementIterator.next();

        HtmlHeading3 h3 = (HtmlHeading3) elementIterator.next();
        assertNotNull( h3 );
        assertEquals( h3.asText().trim(), "Generic Entities: '&' '<' '>' '\"' '''" );

        a = (HtmlAnchor) elementIterator.next();

        HtmlParagraph p = (HtmlParagraph) elementIterator.next();
        assertNotNull( p );
        assertEquals( p.asText().trim(), "'&' '<' '>' '\"' '''" );

        div = (HtmlDivision) elementIterator.next();

        h3 = (HtmlHeading3) elementIterator.next();
        assertNotNull( h3 );
        assertEquals( h3.asText().trim(), "Local Entities: '\u0391' '\u0392' '\u0393' '\uD7ED'" );

        a = (HtmlAnchor) elementIterator.next();

        p = (HtmlParagraph) elementIterator.next();
        assertNotNull( p );
        assertEquals( p.asText().trim(), "'\u0391' '\u0392' '\u0393' '\uD7ED\uD7ED' '\u0159\u0159' '\u0159'" );

        div = (HtmlDivision) elementIterator.next();

        h3 = (HtmlHeading3) elementIterator.next();
        assertNotNull( h3 );
        assertEquals( h3.asText().trim(), "DTD Entities: ' ' '\u00A1' '\u00A2'" );

        a = (HtmlAnchor) elementIterator.next();

        p = (HtmlParagraph) elementIterator.next();
        assertNotNull( p );
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.html.HtmlHeading3

Copyright © 2018 www.massapicom. 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.