Package org.htmlparser.tags

Examples of org.htmlparser.tags.SelectTag


    }

    public void testToString() throws ParserException
    {
        assertTrue("Node 1 should be Select Tag", node[0] instanceof SelectTag);
        SelectTag selectTag;
        selectTag = (SelectTag) node[0];
        assertStringEquals(
            "HTML Raw String",
            "SELECT TAG\n--------\nNAME : Nominees\n"
                + "OPTION VALUE: Spouse TEXT: Spouse\n\n"
                + "OPTION VALUE: Father TEXT: \n\n"
                + "OPTION VALUE: Mother TEXT: Mother\r\n\n\n"
                + "OPTION VALUE: Son TEXT: Son\r\n\n\n"
                + "OPTION VALUE: Daughter TEXT: Daughter\r\n\n\n"
                + "OPTION VALUE: Nephew TEXT: Nephew\n\n"
                + "OPTION VALUE: Niece TEXT: Niece\r\n\n\n",
            selectTag.toString());
    }
View Full Code Here


        assertTrue(node[4] instanceof SelectTag);

        // check the Select node
        for (int j = 0; j < nodeCount; j++)
        {
            SelectTag SelectTag = (SelectTag) node[j];
            assertEquals("Select Scanner", scanner, SelectTag.getThisScanner());
        }

        SelectTag selectTag = (SelectTag) node[0];
        OptionTag[] optionTags = selectTag.getOptionTags();
        assertEquals("option tag array length", 1, optionTags.length);
        assertEquals(
            "option tag value",
            "option1",
            optionTags[0].getOptionText());
View Full Code Here

        return MATCH_NAME;
    }

    public Tag createTag(TagData tagData, CompositeTagData compositeTagData)
    {
        return new SelectTag(tagData, compositeTagData, optionTags);
    }
View Full Code Here

        registerTag (new ObjectTag ());
        registerTag (new OptionTag ());
        registerTag (new ParagraphTag ());
        registerTag (new ProcessingInstructionTag ());
        registerTag (new ScriptTag ());
        registerTag (new SelectTag ());
        registerTag (new StyleTag ());
        registerTag (new TableColumn ());
        registerTag (new TableHeader ());
        registerTag (new TableRow ());
        registerTag (new TableTag ());
View Full Code Here

                new Tag[]
                {
                    new FormTag (),
                    new InputTag (),
                    new TextareaTag (),
                    new SelectTag (),
                    new OptionTag (),
                }));

        parseAndAssertNodeCount(4);
    }
View Full Code Here

                new Tag[]
                {
                    new FormTag (),
                    new InputTag (),
                    new TextareaTag (),
                    new SelectTag (),
                    new OptionTag (),
                    new LinkTag (),
                    new TableTag (),
                }));
        parseAndAssertNodeCount(1);
View Full Code Here

                new Tag[]
                {
                    new FormTag (),
                    new InputTag (),
                    new TextareaTag (),
                    new SelectTag (),
                    new OptionTag (),
                    new TableTag (),
                }));
        parseAndAssertNodeCount(1);
        assertTrue("Should be a HTMLFormTag",node[0] instanceof FormTag);
View Full Code Here

                new Tag[]
                {
                    new FormTag (),
                    new InputTag (),
                    new TextareaTag (),
                    new SelectTag (),
                    new OptionTag (),
                }));
        parseAndAssertNodeCount(1);
        assertTrue("Node 0 should be Form Tag",node[0] instanceof FormTag);
        FormTag formTag = (FormTag)node[0];
View Full Code Here

                new Tag[]
                {
                    new FormTag (),
                    new InputTag (),
                    new TextareaTag (),
                    new SelectTag (),
                    new OptionTag (),
                }));
        parseAndAssertNodeCount(1);
        assertTrue("Node 0 should be Form Tag",node[0] instanceof FormTag);
        FormTag formTag = (FormTag)node[0];
View Full Code Here

        // check the Select node
        for(int j=0;j<nodeCount;j++)
            assertTrue(node[j] instanceof SelectTag);

        SelectTag selectTag = (SelectTag)node[0];
        OptionTag [] optionTags = selectTag.getOptionTags();
        assertEquals("option tag array length",1,optionTags.length);
        assertEquals("option tag value","option1",optionTags[0].getOptionText());
    }
View Full Code Here

TOP

Related Classes of org.htmlparser.tags.SelectTag

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.