1 Reply Latest reply on Nov 30, 2012 6:18 PM by DrClap


      Hello. I am creating my first HtmlUnit app. Here is what I have thus far:


      WebClient client = new WebClient();

      HtmlPage page = client.getPage ("http://mydomain.com/welcome.jsp");

      HtmlHiddenInput hidden = (HtmlHiddenInput) page.getElementByName("pagecodes");



      The output displays the entire input line:

      <input type=hidden name=pagecodes value=12345>


      How can I retrieve only the value of this hidden input?

      Desired output: 12345


      Any suggestions are greatly appreciated.
        • 1. Re: HtmlUnit
          A quick look at the API documentation for the HtmlHiddenInput class shows that it has a "getValueAttribute" method whose description is
          Return the value of the attribute "value".