[Webtest] Problem to submit form with <BUTTON>

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


> In the light of what I've learned above, I would suggest:
>
> - label only refers to what actually appears as label, i.e. the
>   element content in case of clickbutton or the value attribute in
>   case of <input type=submit|button/>
> - we introduce a new attribute "value" referring to the html
>   attribute "value". (For the "input" element this is effectively
>   just an alias for "label".)
>
> This would be backward compatible, consistent between visual appearance
> and test code, consistent between both element types and supports all
> three combinations: only text given, only value given, both given.
>
> ok?

I had a look in the sources to find how can I distinguish a <BUTTON> element 
from an <INPUT> one. With HttpUnit I didn't find it. It looks like HttpUnit 
mix up INPUT and BUTTON tags. For HttpUnit, they are the same element type : 
Button. So I don't know how to write your solution nicely. 

(For INPUT and BUTTON : Button.getValue() returns the attribute value whereas 
Button.getText() returns the content text.)

> cheers
Regards
> Mittie

Xavier