[Webtest] problem with redirect after button invocation

Luca Scheuring webtest@lists.canoo.com
Fri, 16 Jul 2004 11:55:16 +0200


hello webtest community

here my test scenario:
- invocation of a http location
- server sends redirect (302) to a https location which contains a
login-form
- webtest follows redirect and switches properly to https protocol
- webtest fills out the form values and invokes the login button
- server sends back (still using https) a redirect (302) to a http location
(I know this from the webserver log-file)
- webtest switches the protocol back to http and accesses the new http
location (this step fails)

problem:
it seems that webtest can't handle the redirect which is received after the
button invocation. since this works fine using only http (no https), I guess
the problem is the redirect to a http-site as a result of a button
invocation when using https before.

this is the message I get:
Test step clickbutton named "Click the submit button" failed with message
"Step "clickbutton "Click the submit button" (6/7): Page not found : click
button"

in general, switching between http and https released by redirects seems to
work fine in both directions.

I know that my scenario might be a bit unusual but it's the way the website
that I want to test works.

did anybody encounter this problem or does have an idea what I am doing
wrong? (see my ant script below)

thanx, 

--luca

-------------------------------------------

<target name="login">
        <testSpec name="login" >
	<config
                host="myhost"
                port="80"
                protocol="http"
                basepath="/"
		saveresponse="true"
		verbose="true"
		summary="true"
		resultfile="debug.xml"
		showhtmlparseroutput="true"
		 >
	</config>
        	<steps>
		 <invoke
 		  stepid="goto login page"
  			 url="login.html" />
 		<verifytitle stepid="check login"
    			text="Login"  />
 		<setinputfield stepid="set user name" 
 		   name="credential_0"
 		   value="username" />
		 <setinputfield stepid="set password" 
			name="credential_1"
 			 value="*******" />
 		<clickbutton   
 			 label="Go"
 			 stepid="Click the submit button" />
             </steps>
        </testSpec>
</target>