Examples of SelectTag


Examples of org.htmlparser.tags.SelectTag

                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

Examples of org.htmlparser.tags.SelectTag

        // 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

Examples of org.htmlparser.tags.SelectTag

        + "</SELECT>", selectTag.toHtml());
  }

  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

Examples of org.htmlparser.tags.SelectTag

  public String[] getID() {
    return MATCH_NAME;
  }

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

Examples of org.htmlparser.tags.SelectTag

    assertTrue(node[3] instanceof SelectTag);
    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
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.