From: Casey C. <cra...@na...> - 2005-04-27 23:36:28
|
I have a page where I'm moving elements from one widget to another via javascript: (Pardon the ascii art) [Select-Many] [Button -> ] [ Select-Many Results | | | [Select-Many] [Button -> ] | (across all items on left)| | | [TextField] [Button -> ] | ] [Button: OK] The select-many's are prefilled with possible results, the text field lets you manually add results. Each of the buttons labelled -> moves the item from the respective field over to the Results select; this is done using javascript. What I'm trying to do using htmlunit is fill in the text field; click the corresponding button to add it to the results, then click OK. This doesn't work for me (no error, just no change is made when I run the test). I've tried using the following: mainform.submit("name-of-button"); (both catching the return and using it and ignoring the return value) and (ClickableElement) getHtmlElementById("id-of-button") .click() (both catching the return and using it; as well as ignoreing the return value). Is there some way to get javascript mutation of a HtmlPage/HtmlForm to work? To add further complication; the -> buttons are disabled until there is an entry selected in the appropriate select-many or there is text in the text-field. -- Casey |