[Webtest] problem with redirect after button invocation
Marc Guillemot
webtest@lists.canoo.com
Fri, 16 Jul 2004 12:00:57 +0200
Try setting the log level to debug in the WEBTEST_HOME/lib/log4j.properties, you will see a bit more what is working.
Page not found means return code 404 and not 302. May it be that the page to which the server want to redirect with a
302 doesn't exist?
Marc.
Luca Scheuring wrote:
> 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>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>