From: Alexandru P. <the...@ez...> - 2005-05-31 09:06:51
|
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 |
From: Alexandru P. <the...@ez...> - 2005-05-31 09:17:30
|
#: on behalf of Alexandru Popescu :: 5/31/2005 12:04 PM :# > Hi! >=20 > 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. >=20 > 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. >=20 > After some more invesigation it seems like DWR is not > reading the parameters (or maybe HtmlUnit is > not correctly transmitting them). >=20 > A more detailed comment about the patches i need to > apply is here: htmlunit and dwr [1] >=20 > 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). >=20 > :alex |.::the_mindstorm::.| >=20 > ps: sorry for posting it to the ml too >=20 >=20 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.XMLHttpReque= st] - <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 me= thod. XMLHttpRequest is setting in the WebRequestSettings.setRequestBody() with= the following arg: =09 c0-scriptName=3DDwrService callCount=3D1 c0-param0=3Dstring:7 c0-id=3D8360_1117530060338 c0-methodName=3DfindITByUserID xml=3Dtrue (i think these are correct at least from the pov of DWR), but later WebResponse webResponse=3D makeWebResponseForJavaScriptUrl(webWindow, Web= RequestSettings.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 shoul= d 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::.| |
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 > |
From: Alexandru P. <the...@ez...> - 2005-05-31 09:43:24
Attachments:
HTMLScript-patch.txt
|
#: 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::.| |
From: Marc G. <mgu...@ya...> - 2005-05-31 11:19:29
|
Alexandru, the problem has more chance to be quickly fixed if you provide the patch in the right format and post it as attachment of an issue on the bug tracking system with appropriate unit tests. See: http://htmlunit.sourceforge.net/submittingPatches.html Marc. |
From: Alexandru P. <the...@ez...> - 2005-05-31 11:44:23
|
#: on behalf of Marc Guillemot :: 5/31/2005 1:19 PM :# > Alexandru, >=20 > the problem has more chance to be quickly fixed if you provide the patc= h in the right format and post it as attachment=20 > of an issue on the bug tracking system with appropriate unit tests. >=20 > See: > http://htmlunit.sourceforge.net/submittingPatches.html >=20 > Marc. >=20 >=20 Thanks Marc. that was only meant to be assured that it is in the right di= rection (and it was a `diff -u=B4 and also respecting the coding style ;-)). about unit tests, unfortunately i don't think i will have the time to inv= estigate how i can right some for htmlunit, moreover there is already one test submitted. tia, :alex |.::the_mindstorm::.| >=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 |
From: Marc G. <mgu...@ya...> - 2005-05-31 11:50:10
|
> Thanks Marc. that was only meant to be assured that it is in the right direction (and it was a `diff > -u´ and also respecting the coding style ;-)). but not a cvs diff. Therefore no structure information was provided what prohibits to apply it quickly (for instance using Eclipse's Apply patch). It needs to be a cvs diff made in the root of the project. Marc. |
From: Alexandru P. <the...@ez...> - 2005-05-31 12:03:52
Attachments:
HTMLScript-patch.txt
|
#: on behalf of Marc Guillemot :: 5/31/2005 1:52 PM :# >> Thanks Marc. that was only meant to be assured that it is in the right= direction (and it was a `diff >> -u=C2=B4 and also respecting the coding style ;-)). >=20 > but not a cvs diff. Therefore no structure information was provided wha= t prohibits to apply it quickly (for instance=20 > using Eclipse's Apply patch). It needs to be a cvs diff made in the roo= t of the project. >=20 > Marc. >=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 I was just trying to help :-(. I will checkout the cvs project (through m= y modem connection from sf) and than submit again the patch. sorry for disregarding the complete rule= s. :alex |.::the_mindstorm::.| ps: the attached file should work with Eclipse's Apply patch mechanism. T= est unit is provided here: http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1209692&grou= p_id=3D47038&atid=3D448266 |
From: Marc G. <mgu...@ya...> - 2005-05-31 12:20:40
|
Alexandru Popescu wrote: > I was just trying to help :-(. I will checkout the cvs project (through my modem connection from sf) > and than submit again the patch. sorry for disregarding the complete rules. Alexandru, your help is really welcome, sorry if it appeared I was thinking something else. I just wanted to say that it won't take you really much time to provide your patches in the right form (I've been patch proposer too ;-)) and it will really spare committers time. Marc. |
From: Alexandru P. <the...@ez...> - 2005-06-01 07:52:43
|
#: on behalf of Marc Guillemot :: 5/31/2005 2:20 PM :# > Alexandru Popescu wrote: > > I was just trying to help :-(. I will checkout the cvs project (through my modem connection from sf) > > and than submit again the patch. sorry for disregarding the complete rules. > > Alexandru, > > your help is really welcome, sorry if it appeared I was thinking something else. I just wanted to say that it won't take > you really much time to provide your patches in the right form (I've been patch proposer too ;-)) and it will really > spare committers time. > > Marc. > after some more testing i have to admit that the problem is not completely fixed by the patch. sorry. i will try to address it during the weekend. i would like to know how i can address the last problem where the requestBody is ignored for JS calls. any hints will be highly appreciated. :alex |.::the_mindstorm::.| |