Re: how 2 use httpunit deal with js
Wolfgang Fahl <[email protected]> Fri, 16 Apr 2010 08:33:41 +0200
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Organization | BITPlan GmbH |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============0509936132162450482== Content-Type: multipart/alternative; boundary="------------060003030900030004050504" This is a multi-part message in MIME format. --------------060003030900030004050504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Am 16.04.10 04:03, schrieb liang.zhu: > Hi Fahl: > Thanks for ur excellent opensource project:httpunit. it helps us a > lot with our project. > I'm a java developer from china. > Now i need 2 use it simulation a click on option tag.but in the page I > deal with, > the click will run a onchange event and the flow job it done by a > javascript function. > WebConversation wc = new WebConversation(); > com.meterware.httpunit.HttpUnitOptions.setScriptingEnabled(false); > . > . > . > WebResponse resp = wc.getResponse(req); > ScriptingHandler scrh = resp.createJavascriptScriptingHandler(); > String result = scrh.runScript (String arg0,String arg1); > *all i want 2 konw is how 2 use this stuff(httpunit) deal with > javascript*. > i'v read out all the API and search from google and never ever found > out the answer. > Thanks a lot. > sincere ZhuLiang > 2010-04-16 > ------------------------------------------------------------------------ > liang.zhu Dear ZhuLiang, you might want to join the developers mailing list <[email protected]> and work with the FAQ (just posted again yesterday). There you'll find a section on the unit tests for httpunit. There are many examples for javascript testing in there which will show you how much javascript support is available in httpunit. Currently the new scripting engine and the corressponding tests are disabled. You are invited to improve httpunit's documentation. Yours Wolfgang -- 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 --------------060003030900030004050504 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body text="#000000" bgcolor="#ffffff"> Am 16.04.10 04:03, schrieb liang.zhu: <blockquote cite="mid:[email protected]" type="cite"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta content="MSHTML 6.00.2900.5945" name="GENERATOR"> <link href="BLOCKQUOTE%7Bmargin-Top:%200px;%20margin-Bottom:%200px;%20margin-Left:%202em%7D" rel="stylesheet"> <div><font face="Verdana" size="2"> <div>Hi Fahl:</div> <div> Thanks for ur excellent opensource project:httpunit. it helps us a lot with our project.</div> <div>I'm a java developer from china.</div> <div> </div> <div>Now i need 2 use it simulation<span class="phonetic"> a click on option tag.but in the page I deal with,</span></div> <div><span class="phonetic">the click will run a onchange event and the flow job it done by a javascript function.</span></div> <div><span class="phonetic"></span> </div> <span class="phonetic"> <div>WebConversation wc = new WebConversation();</div> <div>com.meterware.httpunit.HttpUnitOptions.setScriptingEnabled(false);</div> <div>.</div> <div>.</div> <div>.</div> <div>WebResponse resp = wc.getResponse(req);</div> <div> <div>ScriptingHandler scrh = resp.createJavascriptScriptingHandler();</div> <div>String result = scrh.runScript (String arg0,String arg1);</div> <div> </div> <div><strong>all i want 2 konw is how 2 use this stuff(httpunit) deal with javascript</strong>.</div> <div>i'v read out all the API and search from google and never ever found out the answer.</div> <div>Thanks a lot.</div> <div> </div> <div>sincere<span class="phonetic"> ZhuLiang</span></div> </div> </span></font></div> <div> </div> <div align="left"><font face="Verdana" size="2" color="#c0c0c0">2010-04-16 </font></div> <font face="Verdana" size="2"> <hr style="width: 122px; height: 2px;" size="2" align="left"> <div><font face="Verdana" size="2" color="#c0c0c0"><span>liang.zhu</span> </font></div> </font></blockquote> Dear ZhuLiang,<br> <br> you might want to join the developers mailing list <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a> and<br> work with the FAQ (just posted again yesterday). There you'll find a section on the unit tests for httpunit.<br> There are many examples for javascript testing in there which will show you how much javascript support is available in httpunit.<br> Currently the new scripting engine and the corressponding tests are disabled.<br> <br> You are invited to improve httpunit's documentation. <br> <br> Yours<br> <br> Wolfgang<br> <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äftsführer: Wolfgang Fahl </pre> </body> </html> --------------060003030900030004050504-- --===============0509936132162450482== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --===============0509936132162450482== 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 --===============0509936132162450482==--