Re: plz help me
Laxman Kumar <[email protected]> Thu, 5 May 2011 12:03:56 +0800
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0407113040422860978==
Content-Type: multipart/alternative;
boundary="_35b563db-9785-47a8-9609-051be40f0cb1_"
--_35b563db-9785-47a8-9609-051be40f0cb1_
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
Hi Rajashree,
try to execute that onclick javascript function body statements using urSubmitForm.doEevent(ur script source) then perform click() on this button.
I hope you should get next page if you do everything fine.
-- Regards
Laxman.
Date: Wed, 4 May 2011 12:41:06 +0530
From: [email protected]
To: [email protected]
Subject: [Httpunit-develop] plz help me
Hi,
Rajashree here. I used httpunit Api for test an application. I have a button having onClick(). After clicking the button it should go next page .but I m getting same page as response . plz help me ¡..
The source code is <td align="left" valign="middle" colspan="2" width=><input type="button" name="UDDIImportPortletsearch" value="Search" width="" title="" class="buttonActive" onClick="setActionAndSubmitForm('searchBusinessServiceForm','http://localhost:7021/sbconsole/sbconsole.portal?_nfpb=true&UDDIImportPortlet_actionOverride=/com/bea/alsb/console/uddi/pageflow/uddiimport/searchBusinessServicesResult')" /></td>
My code is-if(types[i].equals("Button"))
{
ss=form.getButtons();
for(int j=0;j<ss.length;j++)
{
System.out.println("booouufghsd"+ss[j].getName());
if(ss[j].getName().equals(names[i]))
{
if (ss[j] != null) {
// System.out.println("This is not null ");
ss[j].click();
System.out.println("This is not null "+ss[j].getType() );
//form.submit();
//String url="http://wilyisl007:7021/sbconsole/sbconsole.portal?_nfpb=true&UDDIImportPortlet_actionOverride=/com/bea/alsb/console/uddi/pageflow/uddiimport/searchBusinessServicesResult";
//System.out.println("This is not null "+form.getAction());
//request=new GetMethodWebRequest(form.getAction());
//response=wc.getResponse(request);
response=wc.getCurrentPage();
}
}
------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________ Httpunit-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/httpunit-develop
--_35b563db-9785-47a8-9609-051be40f0cb1_
Content-Type: text/html; charset="gb2312"
Content-Transfer-Encoding: 8bit
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi Rajashree,<BR>
<BR>
try to execute that onclick javascript function body statements using urSubmitForm.doEevent(ur script source) then perform click() on this button.<BR>
I hope you should get next page if you do everything fine.<BR>
<BR>
<BR>
-- Regards<BR>
Laxman.<BR> <BR>
<HR id=stopSpelling>
Date: Wed, 4 May 2011 12:41:06 +0530<BR>From: [email protected]<BR>To: [email protected]<BR>Subject: [Httpunit-develop] plz help me<BR><BR>
<P class=ecxMsoNormal><FONT size=3><FONT face=Calibri>Hi,</FONT></FONT></P>
<P class=ecxMsoNormal><FONT size=3><FONT face=Calibri>Rajashree here. I used httpunit Api for test an application. I have a button having onClick(). After clicking the button it should go next page .but I m getting same page as response . plz help me ¡..</FONT></FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3><FONT face=Calibri><B>The source code is</B> <td align="left" valign="middle" colspan="2" width=><input type="button" name="UDDIImportPortletsearch" value="Search" width="" title="" class="buttonActive" onClick="setActionAndSubmitForm('searchBusinessServiceForm','<A href="http://localhost:7021/sbconsole/sbconsole.portal?_nfpb=true&UDDIImportPortlet_actionOverride=/com/bea/alsb/console/uddi/pageflow/uddiimport/searchBusinessServicesResult'" target=_blank>http://localhost:7021/sbconsole/sbconsole.portal?_nfpb=true&UDDIImportPortlet_actionOverride=/com/bea/alsb/console/uddi/pageflow/uddiimport/searchBusinessServicesResult'</A>)" /></td></FONT></FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><FONT size=3 face=Calibri> </FONT></P>
<P class=ecxMsoNormal><B><FONT size=3 face=Calibri>My code is-</FONT></B><B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: 10pt">if</SPAN></B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">(types[i].equals(</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: 10pt">"Button"</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">))</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> {</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">ss</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">=</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">form</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">.getButtons();</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: 10pt">for</SPAN></B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">(</SPAN><B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: 10pt">int</SPAN></B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> j=0;j<</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">ss</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">.</SPAN><SPAN styl
e="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">length</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">;j++)</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> {</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> System.</SPAN><I><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">out</SPAN></I><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">.println(</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: 10pt">"booouufghsd"</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">+</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">ss</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLO
R: black; FONT-SIZE: 10pt">[j].getName());</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: 10pt">if</SPAN></B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">(</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">ss</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">[j].getName().equals(names[i]))</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> {</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: 10pt">if</SPAN></B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> (</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">ss</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">[j] != </SPAN><B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #7f0055; FONT-SIZE: 10pt">null</SPAN></B><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">) {</SPAN><SPAN styl
e="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #3f7f5f; FONT-SIZE: 10pt">// System.out.println("This is not null ");</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">ss</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">[j].click();</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> System.</SPAN><I><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">out</SPAN></I><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">.println(</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #2a00ff; FONT-SIZE: 10pt">"This is not null "</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">+</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">ss</SPAN><SPAN style="FONT-FAMILY: 'Courie
r New'; COLOR: black; FONT-SIZE: 10pt">[j].getType() );</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #3f7f5f; FONT-SIZE: 10pt">//form.submit();</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #3f7f5f; FONT-SIZE: 10pt">//String <U>url</U>="<A href="http://wilyisl007:7021/sbconsole/sbconsole.portal?_nfpb=true&UDDIImportPortlet_actionOverride=/com/bea/alsb/console/uddi/pageflow/uddiimport/searchBusinessServicesResult" target=_blank><FONT color=#0000ff>http://wilyisl007:7021/sbconsole/sbconsole.portal?_nfpb=true&UDDIImportPortlet_actionOverride=/com/bea/alsb/console/uddi/pageflow/uddiimport/searchBusinessServicesResult</FONT>
</A>";</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #3f7f5f; FONT-SIZE: 10pt">//System.out.println("This is not null "+form.getAction());</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #3f7f5f; FONT-SIZE: 10pt">//request=new GetMethodWebRequest(form.getAction()); </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #3f7f5f; FONT-SIZE: 10pt">//response=wc.getResponse(request);</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">response</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">=</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #0000c0; FONT-SIZE: 10pt">wc</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt">.getCurrentPage();</SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> } </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"></SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> } </SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN></P>
<P class=ecxMsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"> </SPAN></P>
<P class=ecxMsoNormal><B><FONT size=3 face=Calibri> </FONT></B></P><BR>------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd<BR>_______________________________________________ Httpunit-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/httpunit-develop </body>
</html>
--_35b563db-9785-47a8-9609-051be40f0cb1_--
--===============0407113040422860978==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
--===============0407113040422860978==
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
--===============0407113040422860978==--