From: Marc G. <mgu...@ya...> - 2005-04-28 10:01:16
|
Hi Casey, this seems that htmlunit should be able to do what you want. Which version do you use? Can you turn the js log level to debug to get more information? Marc. Casey Crabb wrote: > 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 > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |