The groovy code worked,  I submit the bug to HtmlUnit.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Forsberg, Mike
Sent: Thursday, September 17, 2009 9:16 AM
To: [email protected]; Marc Guillemot
Subject: RE: [Webtest] Trouble submitting a form...

Marc, you're a big timesaver.  Thanks for the hack.  I'll try it and
post my results.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Marc Guillemot
Sent: Thursday, September 17, 2009 9:14 AM
To: [email protected]
Subject: Re: [Webtest] Trouble submitting a form...

Hi,

enctype="text/html" is surely incorrect... nevertheless HtmlUnit should 
see that it is incorrect and simply ignore it as "real" browsers do.

Can you please open a bug issue by HtmlUnit for that?

Until this gets fixed and if you can't correct your invalid HTML, as 
workaround you can do something like this before your clickElement

<groovy>
step.context.currentResponse.getFormByName("edit_document").enctypeAttri
bute 
= "application/x-www-form-urlencoded"
</groovy>

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

Forsberg, Mike wrote:
> First, thanks for the great product.  It has saved tons of time and 
> effort and made a portion of my job enjoyable again.
> 
>  
> 
> My problem seems to be  "an unknown encoding"??? for a form
submission. 
> 
>  
> 
> The form is defined as...
> 
>  
> 
> <FORM 
>
action="http://auidc110:8800/fastbal/FabViewServlet?&amp;transaction=com
.amd.aspect.edc.edcui.DocumentUITransaction&amp;request=createDocument" 
> enctype="text/html" id="docForm" method="POST" name="edit_document">
> 
> ...stuff...
> 
> <A class="Operation" 
> href="javascript:document.edit_document.submit();">Accept Changes</A>
> 
> ... a little more stuff...
> 
> </FORM>
> 
>  
> 
> When I try to ClickElement on the anchor tag I get the following...
> 
>  
> 
> JavaScript error loading page <the url> Wrapped 
> java.lang.IllegalArgumentException: No encoding type found for 
> [text/html] (javascript url#156)
> 
>  
> 
> I've googled to no joy.
> 
>  
> 
> Any help would be wonderfull and thank you in advance,
> 
>  
> 
> Big Mike
> 
>  
> 
> P.S. I'm using WebTest 3.0-1758
> 
>  
> 
>  
> 
> *Mike Forsberg*
> 
> *Senior Factory Automation Engineer***
> 
> *5113 Southwest Parkway, Ste 300*
> 
> *Austin, Texas  78735*
> 
>  
> 
> T 512-602-0220
> [email protected]
<mailto:[email protected]>
> 
>  
> 
> http://www.globalfoundries.com/
> 
> *cid:[email protected]*
> 
>  
> 

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to