Re: Fwd: Issue with httpunit-1.7 !!!

Wolfgang Fahl <[email protected]> Mon, 19 Dec 2011 08:34:52 +0100
Newsgroups gmane.comp.web.httpunit.devel
Organization BITPlan GmbH
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============0410346696280459885==
Content-Type: multipart/alternative;
	boundary="------------070309090009000706080005"

This is a multi-part message in MIME format.
--------------070309090009000706080005
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Dear kesav,

you might want to read the FAQ and the comments on the sourceforge 
project main page.
Javascript is only partly supported by httpunit. You might want to 
switch the java script parser off as outlined in the FAQ.
If the websites you need to test are using heavyweight javascript 
httpunit might not be the right tool for the task.

I'm going to again post the FAQ  in a minute.

Wolfgang

Am 15.12.11 14:06, schrieb kesav reddy:
> Hi HttpUnit Developers,
>
>   I am validating HttpUnit for my project use to just see HttpUnit can 
> be used for my next project. During this, i am facing problem. Hope 
> some one can help me out with this. Thanks in Advance.
>
> Problem:: I am getting below exception when i try to invoke 
> "http://search.yahoo.com/search?p=fbi+most+wanted" . I am attaching my 
> source code along with the mail.
>
>   com.meterware.httpunit.ScriptException: Script 'var pL=0, 
> pUrl='http://ybinst9.ec.yimg.com/ec/fd/ls/l?IG=4a06755fc6924b6aa94ee9ebc4398ae8&CID=4a06755fc6924b6aa94ee9ebc4398ae8&Type=Event.CPT';function 
> <http://ybinst9.ec.yimg.com/ec/fd/ls/l?IG=4a06755fc6924b6aa94ee9ebc4398ae8&CID=4a06755fc6924b6aa94ee9ebc4398ae8&Type=Event.CPT%27;function> 
> SLB(s,pUrl){var url,img=new 
> Image(),dat='&DATA=';dat+=s?'%7B%22pp%22%3A%7B%22S%22%3A%22A%22%7D%7D':'%7B%22pp%22%3A%7B%22S%22%3A%22L%22%7D%7D';url=pUrl+dat;img.src=url+'&'+(new 
> Date()).getTime();pL=1}window.onbeforeunload=function(){(!pL)?SLB("A",pUrl):""};window.onload=function(){SLB("",pUrl)};(function(){var 
> h=document.documentElement;h.className+=" js";(new 
> Image()).src='http://l.yimg.com/pv/static/img/metro_sprite-201109271557.png';})() 
> <http://l.yimg.com/pv/static/img/metro_sprite-201109271557.png%27;%7D%29%28%29>;' 
> failed: org.mozilla.javascript.EcmaError: TypeError: Cannot read 
> property "className" from undefined
>     at 
> com.meterware.httpunit.javascript.ScriptingEngineImpl.handleScriptException(ScriptingEngineImpl.java:64)
>     at 
> com.meterware.httpunit.javascript.ScriptingEngineImpl.runScript(ScriptingEngineImpl.java:95)
>     at 
> com.meterware.httpunit.scripting.ScriptableDelegate.runScript(ScriptableDelegate.java:88)
>     at 
> com.meterware.httpunit.parsing.NekoDOMParser.runScript(NekoDOMParser.java:151)
>     at 
> com.meterware.httpunit.parsing.ScriptFilter.getTranslatedScript(ScriptFilter.java:150)
>     at 
> com.meterware.httpunit.parsing.ScriptFilter.endElement(ScriptFilter.java:131)
>     at 
> org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:249)
>     at 
> org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:367)
>     at 
> org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1015)
>     at 
> org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:888)
>     at 
> org.cyberneko.html.HTMLScanner$SpecialScanner.scan(HTMLScanner.java:2831)
>     at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:809)
>     at 
> org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478)
>     at 
> org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>     at 
> com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.java:48)
>     at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:271)
>     at 
> com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1301)
>     at com.meterware.httpunit.WebResponse.getFrames(WebResponse.java:1285)
>     at 
> com.meterware.httpunit.WebResponse.getFrameRequests(WebResponse.java:1024)
>     at 
> com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:179)
>     at 
> com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:315)
>     at 
> com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:526)
>     at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:201)
>     at 
> com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:183)
>     at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:158)
>     at com.meterware.httpunit.WebClient.getResponse(WebClient.java:122)
>     at com.yahoo.sample.httpUnit.Example.main(Example.java:17)
>
>
>
> ------------------------------------------------------------------------------
> 10 Tips for Better Server Consolidation
> Server virtualization is being driven by many needs.
> But none more important than the need to reduce IT complexity
> while improving strategic productivity.  Learn More!
> http://www.accelacomm.com/jaw/sdnl/114/51507609/
>
>
> _______________________________________________
> Httpunit-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/httpunit-develop

-- 

BITPlan - smart solutions
Wolfgang Fahl
Pater-Delp-Str. 1, D-47877 Willich Schiefbahn
Tel. +49 2154 811-480, Fax +49 2154 811-481
Web: http://www.bitplan.de
BITPlan GmbH, Willich - HRB 6820 Krefeld, Steuer-Nr.: 10258040548, Geschäftsführer: Wolfgang Fahl


--------------070309090009000706080005
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear kesav,<br>
    <br>
    you might want to read the FAQ and the comments on the sourceforge
    project main page.<br>
    Javascript is only partly supported by httpunit. You might want to
    switch the java script parser off as outlined in the FAQ.<br>
    If the websites you need to test are using heavyweight javascript
    httpunit might not be the right tool for the task.<br>
    <br>
    I'm going to again post the FAQ&nbsp; in a minute.<br>
    <br>
    Wolfgang<br>
    <br>
    Am 15.12.11 14:06, schrieb kesav reddy:
    <blockquote
cite="mid:CAOOHAdQfyTTkDdhUhtyC+_FTCm8VerbWcqKkTK9Uzq1LapN4kg@mail.gmail.com"
      type="cite">Hi HttpUnit Developers,<br>
      <div class="gmail_quote"><br>
        &nbsp; I am validating HttpUnit for my project use to just see
        HttpUnit can be used for my next project. During this, i am
        facing problem. Hope some one can help me out with this. Thanks
        in Advance.<br>
        <br>
        <span style="background-color:rgb(255,102,102)">Problem::</span>
        I am getting below exception when i try to invoke "<a
          moz-do-not-send="true"
          href="http://search.yahoo.com/search?p=fbi+most+wanted"
          target="_blank">http://search.yahoo.com/search?p=fbi+most+wanted</a>"
        . I am attaching my source code along with the mail.<br>
        &nbsp;<br>
        &nbsp; com.meterware.httpunit.ScriptException: Script 'var pL=0,
        pUrl='<a moz-do-not-send="true"
href="http://ybinst9.ec.yimg.com/ec/fd/ls/l?IG=4a06755fc6924b6aa94ee9ebc4398ae8&amp;CID=4a06755fc6924b6aa94ee9ebc4398ae8&amp;Type=Event.CPT%27;function"
          target="_blank">http://ybinst9.ec.yimg.com/ec/fd/ls/l?IG=4a06755fc6924b6aa94ee9ebc4398ae8&amp;CID=4a06755fc6924b6aa94ee9ebc4398ae8&amp;Type=Event.CPT';function</a>
        SLB(s,pUrl){var url,img=new
        Image(),dat='&amp;DATA=';dat+=s?'%7B%22pp%22%3A%7B%22S%22%3A%22A%22%7D%7D':'%7B%22pp%22%3A%7B%22S%22%3A%22L%22%7D%7D';url=pUrl+dat;img.src=url+'&amp;'+(new
        Date()).getTime();pL=1}window.onbeforeunload=function(){(!pL)?SLB("A",pUrl):""};window.onload=function(){SLB("",pUrl)};(function(){var
        h=document.documentElement;h.className+=" js";(new
        Image()).src='<a moz-do-not-send="true"
href="http://l.yimg.com/pv/static/img/metro_sprite-201109271557.png%27;%7D%29%28%29"
          target="_blank">http://l.yimg.com/pv/static/img/metro_sprite-201109271557.png';})()</a>;'
        failed: org.mozilla.javascript.EcmaError: TypeError: Cannot read
        property "className" from undefined<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.javascript.ScriptingEngineImpl.handleScriptException(ScriptingEngineImpl.java:64)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.javascript.ScriptingEngineImpl.runScript(ScriptingEngineImpl.java:95)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.scripting.ScriptableDelegate.runScript(ScriptableDelegate.java:88)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.parsing.NekoDOMParser.runScript(NekoDOMParser.java:151)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.parsing.ScriptFilter.getTranslatedScript(ScriptFilter.java:150)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.parsing.ScriptFilter.endElement(ScriptFilter.java:131)<br>
        &nbsp;&nbsp;&nbsp; at
org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:249)<br>
        &nbsp;&nbsp;&nbsp; at
org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:367)<br>
        &nbsp;&nbsp;&nbsp; at
org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1015)<br>
        &nbsp;&nbsp;&nbsp; at
        org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:888)<br>
        &nbsp;&nbsp;&nbsp; at
org.cyberneko.html.HTMLScanner$SpecialScanner.scan(HTMLScanner.java:2831)<br>
        &nbsp;&nbsp;&nbsp; at
        org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:809)<br>
        &nbsp;&nbsp;&nbsp; at
        org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:478)<br>
        &nbsp;&nbsp;&nbsp; at
        org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:431)<br>
        &nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)<br>
        &nbsp;&nbsp;&nbsp; at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.java:48)<br>
        &nbsp;&nbsp;&nbsp; at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:271)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1301)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.WebResponse.getFrames(WebResponse.java:1285)<br>
        &nbsp;&nbsp;&nbsp; at
com.meterware.httpunit.WebResponse.getFrameRequests(WebResponse.java:1024)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:179)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:315)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:526)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:201)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:183)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:158)<br>
        &nbsp;&nbsp;&nbsp; at
        com.meterware.httpunit.WebClient.getResponse(WebClient.java:122)<br>
        &nbsp;&nbsp;&nbsp; at com.yahoo.sample.httpUnit.Example.main(Example.java:17)<br>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
<a class="moz-txt-link-freetext" href="http://www.accelacomm.com/jaw/sdnl/114/51507609/">http://www.accelacomm.com/jaw/sdnl/114/51507609/</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Httpunit-develop mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/httpunit-develop">https://lists.sourceforge.net/lists/listinfo/httpunit-develop</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 

BITPlan - smart solutions
Wolfgang Fahl
Pater-Delp-Str. 1, D-47877 Willich Schiefbahn
Tel. +49 2154 811-480, Fax +49 2154 811-481
Web: <a class="moz-txt-link-freetext" href="http://www.bitplan.de">http://www.bitplan.de</a>
BITPlan GmbH, Willich - HRB 6820 Krefeld, Steuer-Nr.: 10258040548, Gesch&auml;ftsf&uuml;hrer: Wolfgang Fahl </pre>
  </body>
</html>

--------------070309090009000706080005--


--===============0410346696280459885==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
--===============0410346696280459885==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop

--===============0410346696280459885==--