From: Gary L. <ch...@ya...> - 2004-09-13 21:44:54
|
Hey all, Unless I am mistaken, HtmlForm.getAllSubmittableElements() iterates over only one level of decendant children (if that's the correct wya to put it), and doesn't check deeper into the DOM for submittable form elements. Is this true? example: <form blah> <div onlyChild> <span spanBlah>text<span> <table twoBlah> <tr threeblah> <td fourBlah> <input bingo></td> <td fourBlah> <input type="image" id="clickMe"></td> </tr> </table> </div> </form> in the case above if I were to click on the image with id "clickMe" getAllSubmittableElements() gets called during the call to [submit( final SubmittableElement submitElement )] where the element submitted is the "clickMe" image. getAllSubmittableElements() calls getChildElementsIterator() which gives me an iterator over what appears to be the only child, the div "onlyChild" (nice name, eh?). So, while the image name gets submitted, the value of the input "bingo" doesn't. of course the resaon I ask this is that I am trying to get HtmlUnit running on our current application and I can't edit text values. The pages have a large number of form elements of all types and they are firmly embedded deep within every kind of html tag. HttpUnit works great for us for checking form values and such, but is a bear when we want to check anything else on the page. Any clues as to how to submit the form values from within deeply embedded html elments? thanks gary ===== ------ A ship is safest in the harbour, but that's not what ships are built for. It's 2001, you better know where your groove is. _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com |