Trouble submitting a form...

View: New views
7 Messages — Rating Filter:   Alert me  

Trouble submitting a form...

by Forsberg, Mike-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

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
nancy.wilkins@...

 

http://www.globalfoundries.com/

cid:image003.jpg@01C9CCA7.CD16FB90

 



Re: Trouble submitting a form...

by bestguy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Text/HTML isn't valid afaik, shouldn't it be multipart/form-data, etc?


On Sep 16, 2009, at 1:15 PM, "Forsberg, Mike" <mike.forsberg@...> 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
nancy.wilkins@...

 

http://www.globalfoundries.com/

<image001.jpg>

 


Re: Trouble submitting a form...

by bestguy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Why are you using "text/html" versus "multipart/form-encoded" for your form?
I don't think that is valid


On 9/16/09 1:15 PM, 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
nancy.wilkins@...

 

http://www.globalfoundries.com/

cid:image003.jpg@01C9CCA7.CD16FB90

 




RE: Trouble submitting a form...

by Forsberg, Mike-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I would agree that that _might_ be the problem.  However, the form submission does work in IE 6 and firefox.  Wouldn’t you know it… I have to have my tests work on the existing web pages before we try and change them.  The webtests will be used to ensure nothing is broken during the code change.

 

Any other ideas?

 

Big Mike

 

From: Gary Thomas [mailto:garlos@...]
Sent: Thursday, September 17, 2009 1:03 AM
To: webtest@...; Forsberg, Mike
Cc: webtest@...
Subject: Re: [Webtest] Trouble submitting a form...

 


Why are you using "text/html" versus "multipart/form-encoded" for your form?
I don't think that is valid


On 9/16/09 1:15 PM, 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
nancy.wilkins@...

 

http://www.globalfoundries.com/

cid:image003.jpg@01C9CCA7.CD16FB90

 

 



Re: Trouble submitting a form...

by Marc Guillemot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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").enctypeAttribute
= "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?&transaction=com.amd.aspect.edc.edcui.DocumentUITransaction&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
> mike.forsberg@... <mailto:nancy.wilkins@...>
>
>  
>
> http://www.globalfoundries.com/
>
> *cid:image003.jpg@...*
>
>  
>

_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest

RE: Trouble submitting a form...

by Forsberg, Mike-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

-----Original Message-----
From: webtest-admin@...
[mailto:webtest-admin@...] On Behalf Of Marc Guillemot
Sent: Thursday, September 17, 2009 9:14 AM
To: webtest@...
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?&transaction=com
.amd.aspect.edc.edcui.DocumentUITransaction&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
> mike.forsberg@...
<mailto:nancy.wilkins@...>
>
>  
>
> http://www.globalfoundries.com/
>
> *cid:image003.jpg@...*
>
>  
>

_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest

RE: Trouble submitting a form...

by Forsberg, Mike-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

-----Original Message-----
From: webtest-admin@...
[mailto:webtest-admin@...] On Behalf Of Forsberg, Mike
Sent: Thursday, September 17, 2009 9:16 AM
To: webtest@...; 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: webtest-admin@...
[mailto:webtest-admin@...] On Behalf Of Marc Guillemot
Sent: Thursday, September 17, 2009 9:14 AM
To: webtest@...
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?&transaction=com
.amd.aspect.edc.edcui.DocumentUITransaction&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
> mike.forsberg@...
<mailto:nancy.wilkins@...>
>
>  
>
> http://www.globalfoundries.com/
>
> *cid:image003.jpg@...*
>
>  
>

_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
WebTest@...
http://lists.canoo.com/mailman/listinfo/webtest