From: Alexandru P. <the...@ez...> - 2005-05-31 09:43:24
|
#: on behalf of Marc Guillemot :: 5/31/2005 11:25 AM :# > Seems to me that the problems you mention are the same as the ones desc= ribed in the bugs: >=20 > http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1209692&gr= oup_id=3D47038&atid=3D448266 > and > http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1209682&gr= oup_id=3D47038&atid=3D448266 >=20 > Marc. >=20 > Alexandru Popescu wrote: >> #: on behalf of Alexandru Popescu :: 5/31/2005 12:04 PM :# >>=20 >>>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=B4 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 >>>[...]=B4. >>> >>>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 >>> >>> >>=20 >>=20 >> As a continuation to this (after some digging): >>=20 >> 1/ DWR is generating a script that has a relative URL in the form: >> /servletContext/servlet/dwr/exec/DwrService.findITByUserID which resul= ts in the following error from >> htmlunit: >>=20 >> [213ms][ERROR][com.gargoylesoftware.htmlunit.javascript.host.XMLHttpRe= quest] - <Unable to initialize >> XMLHttpRequest using malformed URL '/ezreport/servlet/dwr/exec/DwrServ= ice.findITByUserID'.> >>=20 >> I've been able to patch this but on the DWR side and I think this is n= ot quite correct. >>=20 >> However the next problem seems more important: >>=20 >> 2/ the above function has to receive a set of parameters from the POST= method. >> XMLHttpRequest is setting in the WebRequestSettings.setRequestBody() w= ith the following arg: >> =09 >> c0-scriptName=3DDwrService >> callCount=3D1 >> c0-param0=3Dstring:7 >> c0-id=3D8360_1117530060338 >> c0-methodName=3DfindITByUserID >> xml=3Dtrue >>=20 >> (i think these are correct at least from the pov of DWR), >> but later >> WebResponse webResponse=3D makeWebResponseForJavaScriptUrl(webWindow, = WebRequestSettings.getURL()) >> so it seems it is missing all the body. >>=20 >> I guess that if i will be able to include the above content than it sh= ould work. What is your >> impression? >>=20 >>=20 >> i would really like to find out what the experts of htmlunit think abo= ut the aboves. >>=20 >> tia, >> :alex |.::the_mindstorm::.| >>=20 >>=20 >> ------------------------------------------------------- >> 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=3Dfad-ysdn-ostg-q2= 2005 >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>=20 >=20 >=20 >=20 > ------------------------------------------------------- > 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=3Doffad-ysdn-ostg-q= 22005 > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user >=20 >=20 Yes they seem to be quite near. For the 1st one i think i already have a patch, and i will submit it here= for review. (the one in HtmlScript - see attachement). Pls let me know what do you think about it= . What is missing is an idea about what is happening with the WebRequestSet= tings.requestBody. Is there a way i can modify the makeWebResponseForJavaScriptUrl to includ= e also the WebRequestSettings.getRequestBody? :alex |.::the_mindstorm::.| |