Examples of ImageTag


Examples of org.htmlparser.tags.ImageTag

        }
        assertEquals("There should be 5 contained nodes in the link tag", 5, i);
        assertTrue(
            "First contained node should be an image tag",
            containedNodes[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) containedNodes[0];
        assertEquals(
            "Image Location",
            "http://ad.abcnews.com/ad/sponsors/buena_vista_pictures/bvpi-ban0003.gif",
            imageTag.getImageURL());
        assertEquals("Image Height", "60", imageTag.getAttribute("HEIGHT"));
        assertEquals("Image Width", "468", imageTag.getAttribute("WIDTH"));
        assertEquals("Image Border", "0", imageTag.getAttribute("BORDER"));
        assertEquals(
            "Image Alt",
            "See Signs in Theaters 8-2 - Starring Mel Gibson",
            imageTag.getAttribute("ALT"));
        assertTrue(
            "Second contained node should be Tag",
            containedNodes[1] instanceof Tag);
        Tag tag1 = (Tag) containedNodes[1];
        assertEquals(
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        {
            insideNodes[j++] = (Node) e.nextNode();
        }
        assertEquals("Number of contained internal nodes", 1, j);
        assertTrue(insideNodes[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) insideNodes[0];
        assertEquals(
            "Image Tag Location",
            "http://www.fedpage.com/images\\register.gif",
            imageTag.getImageURL());
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

    protected Tag createTag(TagData tagData, Tag tag, String url)
        throws ParserException
    {
        String link = extractImageLocn(tag, url);
        return new ImageTag(tagData, link);
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
        assertEquals(
            "Expected Link",
            "http://www.yahoo.com/abc/def/mypic.jpg",
            imageTag.getImageURL());
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
        assertEquals("Expected Image Locn", "", imageTag.getImageURL());
        assertEquals("Image width", "1", imageTag.getAttribute("WIDTH"));
        assertEquals("Image height", "1", imageTag.getAttribute("HEIGHT"));
        assertEquals("alt", "a", imageTag.getAttribute("ALT"));
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
        assertEquals(
            "Expected Link",
            "http://www.yahoo.com/mypic.jpg",
            imageTag.getImageURL());
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
        assertEquals(
            "Expected Link",
            "http://www.yahoo.com/abc/def/mypic.jpg",
            imageTag.getImageURL());
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
        assertEquals(
            "Expected Link",
            "http://www.yahoo.com/abc/def/mypic.jpg",
            imageTag.getImageURL());
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
        assertEquals(
            "Expected Link",
            "http://www.yahoo.com/abc/def/Hello World.jpg",
            imageTag.getImageURL());
    }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
        String exp = new String("http://www.yahoo.com/abc/def/Hello World.jpg");
        //assertEquals("Length of image",exp.length(),imageTag.getImageLocation().length());
        assertStringEquals("Expected Image", exp, imageTag.getImageURL());
    }
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.