[Webtest] Problem to submit form with <BUTTON>

Xavier MOGHRABI webtest@lists.canoo.com
Mon, 18 Oct 2004 09:51:15 +0200


Hello
> Hi Xavier,
>
> I'm currently about to incorporate your contribution.
>
> I would like to suggest a change:
> How about reusing the "label" parameter instead of
> introducing "text"? This would have the benefit that
> a webtest author could write:
> 	<clickbutton label="bla"/>
> no matter whether the button is realized as
> 	<input type="submit" value="bla" />
> or
> 	<button>bla</button> ?
> This would be consistent in the way that in both
> cases "bla" appears as the button label.
>
> What do you think?


1. The Button element can have the attributes name and value.
The value attribute is sent to the server when submitted.
So we should add an other for relating to the content between the button tags. 
That content is displayed. I've chosen the name text for relating to the 
content because HTTPUNIT 1.6 relates to it with text too.

2. So we can create button like this :
<BUTTON value="accepted" type="button">Accept</BUTTON>
This button contains has the attributes value as "accepted" and the text as 
"Accept"

If you want we could say that the attribute label of <CLICKBUTTON> refers to 
the attribute value of BUTTON if it exists else it refers to the text 
contained between the tags
What do you think about this ?

> cheers
regards

> Mittie

Xavier