From: Gary L. <ch...@ya...> - 2004-09-14 01:47:24
|
messed around and found that com.gargoylesoftware.htmlunit.html.HtmlForm might be improved by the following change: public Collection getAllSubmittableElements() { final List submittableElements = getHtmlElementsByTagNames(Arrays.asList( new String[]{"input", "button", "select", "textarea", "isindex"} )); if(submittableElements == null || submittableElements.size() ==0) { return new ArrayList(); } return submittableElements; } Unless I am wrong, which is likely because I've been working with the API for 2 hours only, getHtmlElementsByTagNames(List acceptableTagNames) gets all the appropriate form elements wherever they may be hiding. The current usage, at least in my source (htmlunit-1.3-pre1) uses getChildElementsIterator(). Anyway, give it a look see if you want. Let me know if there's anything I am missing. thanks g ===== ------ 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!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail |