[Webtest] Re: Cookies and Redirection

work webtest@lists.canoo.com
Tue, 16 May 2006 13:59:23 -0400

Here is the login.xml file that I am running: 

 <echo message="Starting login.xml" />
<invoke description="Log In to Apps"
       url="" />
 <echo message="invoke step complete" />
<setInputField description="Enter the User Name"
              value="${valid.uid}" />
 <echo message="filled out j_username" />
<setInputField description="Enter the Password"
              value="${valid.pwd}" />
 <echo message="********************************* filled out j_password" />
 <groovy description="Change cookie policy to: ignore cookies">
   import org.apache.commons.httpclient.cookie.CookiePolicy
   import org.apache.commons.httpclient.params.* 

<clickButton description="Click the 'Log In' Button"
            label="Log In" />
<storeCookie name="JSESSIONID" property="sessioncookie" description="storing 
session cookie"/>
 <echo message="********************************* Clicked Log In Button" />
<verifyText description="Main Menu Page - Or Bookmarked Page should be 
            text="${login.page.text}" /> 

The above is inside of: 

<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY config SYSTEM "file:../modules/config.xml">
<!ENTITY login  SYSTEM "file:../modules/login.xml">
<!ENTITY logout SYSTEM "file:../modules/logout.xml">

<project name="logintests" basedir="." default="loginTests">
	<target name="loginTests">
		<webtest name="Log In Test - Successful">

Marc Guillemot writes: 

> have you tried to change the cookie policy? I can't see it in the log
> you provided. 
> Marc.
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest