Examples of InputTag


Examples of org.htmlparser.tags.InputTag

    protected void assertHiddenIDTagPresent(
        FormTag formTag,
        String name,
        String inputTagValue)
    {
        InputTag inputTag = formTag.getInputTag(name);
        assertNotNull(
            "Hidden Tag " + name + " should have been there",
            inputTag);
        assertStringEquals(
            "Hidden Tag Contents",
            inputTagValue,
            inputTag.getAttribute("VALUE"));
        assertStringEquals(
            "Hidden Tag Type",
            "hidden",
            inputTag.getAttribute("TYPE"));
    }
View Full Code Here

Examples of org.htmlparser.tags.InputTag

        parser.addScanner(scanner);
        parseAndAssertNodeCount(1);
        assertTrue(node[0] instanceof InputTag);

        // check the input node
        InputTag inputTag = (InputTag) node[0];
        assertEquals("Input Scanner", scanner, inputTag.getThisScanner());
        assertEquals("Type", "text", inputTag.getAttribute("TYPE"));
        assertEquals("Name", "Google", inputTag.getAttribute("NAME"));
    }
View Full Code Here

Examples of org.htmlparser.tags.InputTag

        assertStringEquals(
            "Location",
            "http://www.google.com/test/do_login.php",
            formTag.getFormLocation());
        assertStringEquals("Name", "login_form", formTag.getFormName());
        InputTag nameTag = formTag.getInputTag("name");
        InputTag passwdTag = formTag.getInputTag("passwd");
        InputTag submitTag = formTag.getInputTag("submit");
        InputTag dummyTag = formTag.getInputTag("dummy");
        assertNotNull("Input Name Tag should not be null", nameTag);
        assertNotNull("Input Password Tag should not be null", passwdTag);
        assertNotNull("Input Submit Tag should not be null", submitTag);
        assertNull("Input dummy tag should be null", dummyTag);
View Full Code Here

Examples of org.htmlparser.tags.InputTag

    }

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

Examples of org.htmlparser.tags.InputTag

                    AppletTag applet= (AppletTag)node;
                    binUrlStr= applet.getAppletClass();
                }
                else if (node instanceof InputTag)
                {
                    InputTag input= (InputTag)node;
                    // we check the input tag type for image
                    String strType= input.getAttribute("type");
                    if (strType != null && strType.equalsIgnoreCase("image"))
                    {
                        // then we need to download the binary
                        binUrlStr= input.getAttribute("src");
                    }
        } else if (node instanceof LinkTag){
          LinkTag link = (LinkTag)node;
          if (link.getChild(0) instanceof ImageTag){
            ImageTag img = (ImageTag)link.getChild(0);
View Full Code Here

Examples of org.htmlparser.tags.InputTag

                  FormTag form = (FormTag) ni.nextNode();
                  String fragment = "action:"+form.getAttribute("action")+" method:"+form.getAttribute("method");
                  _model.addFragment(url, id, FragmentsModel.KEY_FORMS,fragment );
                }
                for (NodeIterator ni = inputs.elements(); ni.hasMoreNodes(); ) {
                  InputTag tag = (InputTag) ni.nextNode();
                  String type = tag.getAttribute("type");
                  if( "hidden".equals(type))
                  {
                    String fragment = tag.toHtml();
                    _model.addFragment(url, id, FragmentsModel.KEY_HIDDENFIELD, fragment);
                  }
                  if("file".equals(type))
                  {
                    String fragment = tag.toHtml();
                    _model.addFragment(url, id, FragmentsModel.KEY_FILEUPLOAD, fragment);
                  }
                }
            } catch (ParserException pe) {
                _logger.warning("Looking for fragments, got '" + pe + "'");
View Full Code Here

Examples of org.htmlparser.tags.InputTag

        registerTag (new FormTag ());
        registerTag (new FrameSetTag ());
        registerTag (new FrameTag ());
        registerTag (new HeadingTag ());
        registerTag (new ImageTag ());
        registerTag (new InputTag ());
        registerTag (new JspTag ());
        registerTag (new LabelTag ());
        registerTag (new LinkTag ());
        registerTag (new MetaTag ());
        registerTag (new ObjectTag ());
View Full Code Here

Examples of org.htmlparser.tags.InputTag

                );
        }
    }

    protected void assertHiddenIDTagPresent(FormTag formTag, String name, String inputTagValue) {
        InputTag inputTag = formTag.getInputTag(name);
        assertNotNull("Hidden Tag "+name+" should have been there", inputTag);
        assertStringEquals("Hidden Tag Contents", inputTagValue, inputTag.getAttribute("VALUE"));
        assertStringEquals("Hidden Tag Type", "hidden", inputTag.getAttribute("TYPE"));
    }
View Full Code Here

Examples of org.htmlparser.tags.InputTag

        assertTrue("Node 0 should be Form Tag",node[0] instanceof FormTag);
        FormTag formTag = (FormTag)node[0];
        assertStringEquals("Method",FormTag.POST,formTag.getFormMethod());
        assertStringEquals("Location","http://www.google.com/test/do_login.php",formTag.getFormLocation());
        assertStringEquals("Name","login_form",formTag.getFormName());
        InputTag nameTag = formTag.getInputTag("name");
        InputTag passwdTag = formTag.getInputTag("passwd");
        InputTag submitTag = formTag.getInputTag("submit");
        InputTag dummyTag = formTag.getInputTag("dummy");
        assertNotNull("Input Name Tag should not be null",nameTag);
        assertNotNull("Input Password Tag should not be null",passwdTag);
        assertNotNull("Input Submit Tag should not be null",submitTag);
        assertNull("Input dummy tag should be null",dummyTag);
View Full Code Here

Examples of org.htmlparser.tags.InputTag

        parser.setNodeFactory (
            new PrototypicalNodeFactory (
                new Tag[]
                {
                    new FormTag (),
                    new InputTag (),
                    new TextareaTag (),
                    new SelectTag (),
                    new OptionTag (),
                }));
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.