Examples of FrameTag


Examples of org.htmlparser.tags.FrameTag

    parseAndAssertNodeCount(4);

    assertTrue("Node 1 should be Frame Tag", node[1] instanceof FrameTag);
    assertTrue("Node 2 should be Frame Tag", node[2] instanceof FrameTag);

    FrameTag frameTag1 = (FrameTag) node[1];
    FrameTag frameTag2 = (FrameTag) node[2];
    assertEquals("Frame 1 Locn", "http://www.google.com/test/demo_bc_top.html", frameTag1.getFrameLocation());
    assertEquals("Frame 1 Name", "topFrame", frameTag1.getFrameName());
    assertEquals("Frame 2 Locn", "http://www.kizna.com/web_e/", frameTag2.getFrameLocation());
    assertEquals("Frame 2 Name", "mainFrame", frameTag2.getFrameName());
    assertEquals("Frame 1 Scrolling", "NO", frameTag1.getAttribute("scrolling"));
    assertEquals("Frame 1 Border", "NO", frameTag1.getAttribute("frameborder"));
  }
View Full Code Here

Examples of org.htmlparser.tags.FrameTag

  protected Tag createTag(TagData tagData, Tag tag, String url) throws ParserException {
    String frameUrl = extractFrameLocn(tag, url);
    String frameName = extractFrameName(tag, url);

    return new FrameTag(tagData, frameUrl, frameName);
  }
View Full Code Here

Examples of org.htmlparser.tags.FrameTag

    assertEquals("Rows", "115,*", frameSetTag.getAttribute("rows"));
    assertEquals("FrameBorder", "NO", frameSetTag.getAttribute("FrameBorder"));
    assertEquals("FrameSpacing", "0", frameSetTag.getAttribute("FrameSpacing"));
    assertEquals("Border", "0", frameSetTag.getAttribute("Border"));
    // Now check the frames
    FrameTag topFrame = frameSetTag.getFrame("topFrame");
    FrameTag mainFrame = frameSetTag.getFrame("mainFrame");
    assertNotNull("Top Frame should not be null", topFrame);
    assertNotNull("Main Frame should not be null", mainFrame);
    assertEquals("Top Frame Name", "topFrame", topFrame.getFrameName());
    assertEquals("Top Frame Location", "http://www.google.com/test/demo_bc_top.html", topFrame.getFrameLocation());
    assertEquals("Main Frame Name", "mainFrame", mainFrame.getFrameName());
    assertEquals("Main Frame Location", "http://www.kizna.com/web_e/", mainFrame.getFrameLocation());
    assertEquals("Scrolling in Main Frame", "AUTO", mainFrame.getAttribute("Scrolling"));
  }
View Full Code Here

Examples of org.htmlparser.tags.FrameTag

          }
        } else if (node instanceof ScriptTag) {
          ScriptTag script = (ScriptTag) node;
          binUrlStr = script.getAttribute("src");
        } else if (node instanceof FrameTag) {
          FrameTag tag = (FrameTag) node;
          binUrlStr = tag.getAttribute("src");
        } else if (node instanceof LinkTagTag) {
          LinkTagTag script = (LinkTagTag) node;
          if (script.getAttribute("rel").equalsIgnoreCase("stylesheet")) {
            binUrlStr = script.getAttribute("href");
          }
        } else if (node instanceof FrameTag) {
          FrameTag script = (FrameTag) node;
          binUrlStr = script.getAttribute("src");
        } else if (node instanceof BgSoundTag) {
          BgSoundTag script = (BgSoundTag) node;
          binUrlStr = script.getAttribute("src");
                } else if (node instanceof Tag) {
                    Tag tag = (Tag) node;
                    String tagname=tag.getTagName();
                    if (tagname.equalsIgnoreCase("EMBED")){
                        binUrlStr = tag.getAttribute("src")
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.