From: Marc G. <mgu...@ya...> - 2005-05-31 09:22:51
|
Seems to me that the problems you mention are the same as the ones described in the bugs: http://sourceforge.net/tracker/index.php?func=detail&aid=1209692&group_id=47038&atid=448266 and http://sourceforge.net/tracker/index.php?func=detail&aid=1209682&group_id=47038&atid=448266 Marc. Alexandru Popescu wrote: > #: on behalf of Alexandru Popescu :: 5/31/2005 12:04 PM :# > >>Hi! >> >>I was trying to test one of my working project page >>using HtmlUnit. The tricky part about this was >>that the page under test uses DWR to fill in 3 >>select-s: the 1st one triggered by the body onload, >>and the other 2 by the preceding select onchange event. >> >>It seems i have reached some problems (and I am not >>sure which side is not working correctly), but >>after some `hacking´ i've been able to pass over some >>of the problems, ending by a message from DWR >>stating that `if i understand the way my browser works >>[...]´. >> >>After some more invesigation it seems like DWR is not >>reading the parameters (or maybe HtmlUnit is >>not correctly transmitting them). >> >>A more detailed comment about the patches i need to >>apply is here: htmlunit and dwr [1] >> >>Now my questions are: >>1/ is anybody successfully tested such a scenario? >>2/ can anybody put some light on the last problem? (or >>on the previous one, in case i did something >>wrong). >> >>:alex |.::the_mindstorm::.| >> >>ps: sorry for posting it to the ml too >> >> > > > As a continuation to this (after some digging): > > 1/ DWR is generating a script that has a relative URL in the form: > /servletContext/servlet/dwr/exec/DwrService.findITByUserID which results in the following error from > htmlunit: > > [213ms][ERROR][com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRequest] - <Unable to initialize > XMLHttpRequest using malformed URL '/ezreport/servlet/dwr/exec/DwrService.findITByUserID'.> > > I've been able to patch this but on the DWR side and I think this is not quite correct. > > However the next problem seems more important: > > 2/ the above function has to receive a set of parameters from the POST method. > XMLHttpRequest is setting in the WebRequestSettings.setRequestBody() with the following arg: > > c0-scriptName=DwrService > callCount=1 > c0-param0=string:7 > c0-id=8360_1117530060338 > c0-methodName=findITByUserID > xml=true > > (i think these are correct at least from the pov of DWR), > but later > WebResponse webResponse= makeWebResponseForJavaScriptUrl(webWindow, WebRequestSettings.getURL()) > so it seems it is missing all the body. > > I guess that if i will be able to include the above content than it should work. What is your > impression? > > > i would really like to find out what the experts of htmlunit think about the aboves. > > tia, > :alex |.::the_mindstorm::.| > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=fad-ysdn-ostg-q22005 > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |