[Webtest] How do I deal with recirection? - "Redirect requested but followRedirects is disabled"

Michael Knapp webtest@lists.canoo.com
Fri, 14 Apr 2006 17:08:53 -0700


I routinely get the 'Redirect requested but followRedirects is disabled'
message, but I believe it's spurious as my redirects /are/ followed.=20

You should make sure you have '<header name=3D"followRedirects"
value=3D"true" />' in your <config> element.

Mike

> -----Original Message-----
> From: webtest-admin@lists.canoo.com=20
> [mailto:webtest-admin@lists.canoo.com] On Behalf Of Chris Gerrard
> Sent: Friday, April 14, 2006 4:51 PM
> To: webtest@lists.canoo.com
> Subject: [Webtest] How do I deal with recirection? -=20
> "Redirect requested but followRedirects is disabled"
>=20
> Hi,
>=20
> I'm trying to write some tests for an application my company=20
> is developing for the local civic government.
> Our app is hosted in the gov.'s environment. Login is handled=20
> by redirecting to their login page, to which the username and=20
> password are sent, and which in turn redirects back to our=20
> app upon authentication.
>=20
> I got the first bit of the test working, contacting our app's=20
> URL and then seeing the login page.
>=20
> Putting values into the userName and password files, and=20
> invoking clickButton sends the test off on a seemingly=20
> unending round of trying to access something.
> At this point I don't know what's going on, am at a loss and=20
> wonder if there's any help.
>=20
> My test steps are below, along with the first couple of=20
> iterations of the output generated after clickButton.
>=20
> Apparently the verifyTitle step never gets invoked.
>=20
> I've googled and looked around as best I can, but have been=20
> able to find nothing that points me down the right path.
>=20
> Thanks in advance,
>=20
> Chris Gerrard
>=20
>=20
>=20
> <steps>
>     <invoke  description=3D"Try contacting WEPS"
>              url=3D"wepsmain.aspx"
>              />
>     <verifyTitle description=3D"we should see the ... login page =
title"
>                  text=3D"..."
>                  />
>     <setInputField description=3D"set userName"
>                    name=3D"userName"
>                    value=3D"..." />
>     <setInputField description=3D"set password"
>                    name=3D"password"
>                    value=3D"..." />
>     <clickButton description=3D"Click the submit button"
>                  label=3D"Submit" />
>     <verifyTitle description=3D"... Main Page shows if login is=20
> successful"
>                  text=3D"..." />
> </steps>
>=20
> [clickButton]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:=20
> clickButton "Click the submit button" (5/6) [clickButton]  INFO
> (com.canoo.webtest.steps.request.AbstractTargetAction) - ->=20
> gotoTarget by clickButton with name: null [clickButton]  INFO=20
> (com.canoo.webtest.steps.request.ClickButton) - ->=20
> findTarget(by input): name=3DB1 value=3DSubmit [clickButton] =20
> INFO (org.apache.commons.httpclient.HttpMethodBase) -=20
> Discarding unexpected response: HTTP/1.1 100 Continue=20
> [clickButton]  INFO=20
> (org.apache.commons.httpclient.HttpMethodDirector) - Redirect=20
> requested but followRedirects is disabled [clickButton]  WARN=20
> (com.gargoylesoftware.htmlunit.html.HtmlPage) - Expected=20
> content type of text/javascript or application/x-javascript=20
> for remotely loaded javascript element=20
> http://www.dc.gov/vincludes/global.asp but got [text/html]=20
> [clickButton]  INFO
> (com.gargoylesoftware.htmlunit.javascript.host.Document) -=20
> Added cookie:=20
> DC=3Dcounter:2
> [clickButton]  INFO=20
> (org.apache.commons.httpclient.HttpMethodBase) - Discarding=20
> unexpected response: HTTP/1.1 100 Continue [clickButton] =20
> INFO (org.apache.commons.httpclient.HttpMethodDirector) -=20
> Redirect requested but followRedirects is disabled=20
> [clickButton]  INFO=20
> (org.apache.commons.httpclient.HttpMethodDirector) - Redirect=20
> requested but followRedirects is disabled [clickButton]  WARN=20
> (com.gargoylesoftware.htmlunit.html.HtmlPage) - Expected=20
> content type of text/javascript or application/x-javascript=20
> for remotely loaded javascript element=20
> http://www.dc.gov/vincludes/global.asp but got [text/html]
>=20
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>=20
>=20