Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlHeading2.asText()


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

        HtmlHeading2 h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( h2.asText().trim(), "Oft Asked Questions" );

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

        a = (HtmlAnchor) elementIterator.next();
View Full Code Here


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

        h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( h2.asText().trim(), "Contributing" );

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

        HtmlDefinitionList dl = (HtmlDefinitionList) elementIterator.next();
View Full Code Here

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

        h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( h2.asText().trim(), "Using Maven" );

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

        dl = (HtmlDefinitionList) elementIterator.next();
View Full Code Here

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

        HtmlHeading2 h2 = (HtmlHeading2) elementIterator.next();
        assertNotNull( h2 );
        assertEquals( "Links", h2.asText().trim() );

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

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

        assertEquals( "section", div.getAttribute( "class" ) );

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

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

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

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

        h2 = (HtmlHeading2) elementIterator.next();
        assertNotNull( h2 );
        assertEquals( "No Default Anchor in Section Title with Explicit Anchor", h2.asText().trim() );
        a = (HtmlAnchor) elementIterator.next();
        assertEquals( "No_Default_Anchor_in_Section_Title_with_Explicit_Anchor", a.getAttribute( "name" ) );

        div = (HtmlDivision) elementIterator.next();
        assertEquals( "section", div.getAttribute( "class" ) );
View Full Code Here

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

        HtmlHeading2 h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( h2.asText().trim(), "Oft Asked Questions" );

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

        a = (HtmlAnchor) elementIterator.next();
View Full Code Here

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

        h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( h2.asText().trim(), "Contributing" );

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

        HtmlDefinitionList dl = (HtmlDefinitionList) elementIterator.next();
View Full Code Here

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

        h2 = (HtmlHeading2) elementIterator.next();
        assertEquals( h2.asText().trim(), "Using Maven" );

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

        dl = (HtmlDefinitionList) elementIterator.next();
View Full Code Here

        assertNotNull( div );
        assertEquals( div.getAttribute( "class" ), "section" );

        HtmlHeading2 h2 = (HtmlHeading2) elementIterator.next();
        assertNotNull( h2 );
        assertEquals( h2.asText().trim(), "section name" );

        HtmlAnchor a = (HtmlAnchor) elementIterator.next();
        assertNotNull( a );
        assertEquals( a.getAttribute( "name" ), "section_name" );
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.