2 messages in com.canoo.lists.webtestRE: [Webtest] GETs on hrefs in form w...| From | Sent On | Attachments |
|---|---|---|
| Glen Cordrey | 10 Feb 2004 10:01 | |
| Glen Cordrey | 11 Feb 2004 05:51 |
| Subject: | RE: [Webtest] GETs on hrefs in form when clickbutton![]() |
|---|---|
| From: | Glen Cordrey (gcor...@convera.com) |
| Date: | 02/11/2004 05:51:07 AM |
| List: | com.canoo.lists.webtest |
I discovered the problem was pilot error - I had a verifylinks call that was
causing the GETs.
-----Original Message----- From: Glen Cordrey Sent: Tuesday, February 10, 2004 1:02 PM To: webt...@lists.canoo.com Subject: [Webtest] GETs on hrefs in form when clickbutton
I have a <form that contains 1 field and many href's to Struts .do's, as shown
below (yes, there's no need for the href's to be inside the form, but that's how
it is
and I can't change it). When I use clickbutton to submit the form (Ant snippet
below)
Webtest first does GETs for each of the hrefs in the form, then does the POST.
If I
exercise the form manually GETs for the hrefs aren't done, and when Webtest does
them failures result because the GETs seem to have thrown off the servlet's
state.
So, a couple of questions:
1. Is the Ant snippet correct, or should I be doing something different?
2. Assuming I can't change the form, is there a way for me in Webtest to submit
the form, via clickbutton or any other mechnism, without triggering the GETs
that
result from the hrefs?
<!-- example of form containing hrefs -->
<form name="myForm" id="queryForm"
action="execQuery.do" method="POST">
...
<a href="someAction.do" ... >
...
<!-- actual form field and image button -->
<input name="queryString" type="text" size="48" value=""
testID="input_queryString"/>
<input type="image" name="myButton" id="imgSearch"
src="images/local/btn_search.gif" testID="input_image_submitSearch" alt="search"
>
..
< href="anotherAction.do" ...?
</form>
Ant snippet submitting the form:
<setinputfield stepid="Submit search form" name="queryString" value="congress" /> <clickbutton stepid="exec query" name="myButton"> <form name="myForm" /> </clickbutton>
Glen Cordrey Convera voice: (410) 740-8800 x1150 http://www.convera.com fax: (410) 740-8810




