[Webtest] Re: Turning off HTML Validation

Marc Guillemot webtest@lists.canoo.com
Mon, 10 May 2004 21:09:40 +0200


Hi John,

it's not html validation and it's made by httpunit.

It seems that you try to set a value for a select field that is not available. httpunit refuses that, I guess because it 
is something what couldn't be done in a "normal" browser.

I had the same problem for a few months and I tryed the HttpUnitOptions.setParameterValuesValidated(false) without 
results as you did. In my case the select was filled dynamically with a javascript that was not supported by httpunit. 
After a few changes (more a "castration" than a change due to httpunit limited js support) to my js code, it was ok for 
httpunit too.

Marc.

Smith, John C wrote:
> 
> Hello fellow Canooers!
> 
> 
> When I execute my tests I get the following error:
> 
> Test step clickbutton named "Search: Click the go button" failed with 
> message "Illegal parameter LAPLSD00.wkCurrActionCd in form [lapcsrx1, 
> POST, /uinew/ui.do, , , _top, , POST request for 
> (___http://afdev:8080/uinew/ui.do?SendDags=yes&NewScreen=lapcsrx1_ 
> <http://afdev:8080/uinew/ui.do?SendDags=yes&NewScreen=lapcsrx1>) 
> /uinew/ui.do] with message <Parameter 'LAPLSD00.wkCurrActionCd' must 
> have the value ''. Attempted to set it to: { I }> "
> 
> I attempted to turn html validation off by changing the following source 
> code in Setup.java:
> 
> // Enable the validate parameters option in order to
> // to detect a incorrect parameter name
>     HttpUnitOptions.setParameterValuesValidated(false);
> 
> I rebuilt webtest.jar and moved the jar file from the deploy directory 
> to the lib directory.  When I reran the test I continue to get the same 
> error.  This is very puzzling.  Why does Canoo continue to validate html 
> when I have turned it off?   How can I confirm that Canoo is pointing to 
> the correct webtest.jar file?
> 
> Thanks,
> 
> John
> 
>