[Webtest] clickbutton with button tag

webtest@lists.canoo.com webtest@lists.canoo.com
Tue, 6 Aug 2002 13:09:24 -0500


OK.  I just did some hunting and found this code in HttpUnit.
Look at line 8.  This shows that HttpUnit is at least TRYING to load
<button> nodes.
Unfortunately, this is with 1.4.1 HttpUnit code.
Has anyone tried WebTest with HttpUnit 1.4.1 (WebTest ships with
HttpUnit 1.3, yes?)?

1    static FormControl newFormParameter( WebForm form, Node node ) {
2        if (node.getNodeType() !=3D Node.ELEMENT_NODE) {
3            return null;
4        } else if (node.getNodeName().equals( "textarea" )) {
5            return new TextAreaFormControl( node );
6        } else if (node.getNodeName().equals( "select" )) {
7            return new SelectionFormControl( node );
8        } else if (node.getNodeName().equals( "button" )) {
            final String type =3D NodeUtils.getNodeAttribute( node,
"type", "submit" );
            if (type.equalsIgnoreCase( "submit" )) {
                return new SubmitButton( form, node );
            } else {
                return null;
            }

-----Original Message-----
From: Dierk Koenig [mailto:dierk.koenig@canoo.com]
Sent: Tuesday, August 06, 2002 12:26 PM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] clickbutton with button tag


Hi Ben,

I don't claim this solution to be the only way to go.

Using WebForm makes it very to do the associated "submit" with
all the parameters filled correctly.

still thinking
Mittie


-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On
Behalf Of Ben Cox
Sent: Dienstag, 6. August 2002 18:54
To: webtest@gate.canoo.com
Subject: Re: [Webtest] clickbutton with button tag


Dierk,
  While I understand that the getSubmitButtons() function doesn't find
<button> tags, I don't see why it's strictly necessary to implement it
this
way.  Couldn't there another piece of logic in the same function
searching
for all of the <button> tags when the getSubmitButtons() fails?
Wouldn't
require editing HttpUnit.

    Ben

Dierk Koenig wrote:

Hi Erik,

it is weird, but <clickbutton> does not find the <button> tag, although
this
is
proper html 4.0.

Reason is, that we relay the call to httpunit's
WebForm.getSubmitButtons()
method
that in turn only looks for the input type submit and not for button
tags.

Fixing this requires looking for the latest httpunit changes and
eventually
updating or otherwise submitting some changes to httpunit itself.

I will follow up, but I cannot promise a date.

Meanwhile you will not be able to use <clickbutton> in your example.
Changing the webapp to using the input type=3Dsubmit style would do the
trick but is like a step backwards from the webapp perspective.

Maybe it is possible to <invoke> the form with predefined parameters(?).

cheers
Mittie



-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of
Erik.Ostermueller@alltel.com
Sent: Dienstag, 6. August 2002 17:31
To: webtest@lists.canoo.com
Subject: RE: [Webtest] cruisecontrol


The doc for <clickbutton> shows that it supports
html like this:

<INPUT type=3D"submit"  value=3D"doIt" />


My html button looks a bit different:
	<button type=3D"submit"  ID=3D"idSearchButton" CLASS=3D"button">
                        Search
	</button>

What should my <clickbutton> look like for the above html?



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


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

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