Re: [JWebUnit-users] jwebunit cannot run servlet?
Brought to you by:
henryju
From: Julien H. <he...@ya...> - 2012-08-04 16:58:19
|
Hi, HtmlUnit (and as a result JWebUnit) doesn't download images by default (this is a headless browser). You can try solutions proposed here: http://stackoverflow.com/questions/2244272/how-can-i-tell-htmlunits-webclient-to-download-images-and-css Or simply try URL url = new URL(baseUrl + "AuthImage.do"); url.getContent(); Regards, Julien >________________________________ > De : 李麒慶 <e4...@gm...> >À : jwe...@li... >Envoyé le : Samedi 4 août 2012 5h22 >Objet : [JWebUnit-users] jwebunit cannot run servlet? > > > I am try to test a page for Registration >Here is some part of the registration.jsp code: > > ><label><span class="text" style="font-size:24px;"><img border=0 src="AuthImage.do" alt=""/></span></label></td> > > >AuthImage.do is the java source code ,it generates Verification code and return an image to the registration.jsp, user then >types the number for what they see in the image. > > >However, when I use JWebunit to test, it seems not automatically run AuthImage.do to generate image. >Is JWebunit doesn't support this unless we use such like (<form name="registerform" action=" AuthImage .do" method="post">)? >But the AuthImage.do needs load before user submit the form,so is there any solution for this? > > >Thank you for your advice. >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >JWebUnit-users mailing list >JWe...@li... >https://lists.sourceforge.net/lists/listinfo/jwebunit-users > > > |