Package org.htmlparser.tags

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


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

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

    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

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.