Many thanks - and thank you for your quick responses.
Another one on its way in a moment :-) hopefully you (or someone else) can
be as helpful with that one!
Cheers
--rob
On 9/17/07, Julien HENRY <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Do not use beginAt after logging in. beginAt simulate
> a new conversation (typically a freshly opened
> browser). Use gotoPage() to go to a specific location
> with the same context.
>
> // login
> beginAt("/user/loginForm");
> setTextField("user[email]", email);
> setTextField("user[password]", password);
> submit();
>
> // get page under test
> gotoPage("/location/status");
> assertFormNotPresent("user_login");
>
> ++
>
> Julien
>
> --- Rob Desbois <[EMAIL PROTECTED]> a écrit :
>
> > Hi,
> >
> > I'm trying to test pages that require the user to be
> > logged in by performing
> > a login request before the page under test:
> >
> > // login
> > >
> > beginAt("/user/loginForm");
> > >
> > setTextField("user[email]", email);
> > > setTextField("user[password]", password);
> > > submit();
> >
> > // get page under test
> > >
> > beginAt("/location/status");
> > > assertFormNotPresent("user_login");
> > >
> >
> > Using dumpCookies() I can see that PHPSESSID is
> > being passed back in the
> > response, however it is not being set in the
> > TestContext - getCookies() always
> > returns an empty list for that.
> >
> > I know how to set a cookie in the TestContext, but
> > how can I retrieve the
> > cookies sent back by the server?
> >
> > TIA,
> > --rob
> >
> >
> > --
> > Rob Desbois
> > >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio
> > 2005.
> >
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/>
> _______________________________________________
> > JWebUnit-users mailing list
> > JWebUnit-users@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
> >
>
>
>
>
>
> _____________________________________________________________________________
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
> Mail
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> JWebUnit-users mailing list
> JWebUnit-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
--
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 01452 760631
Mob: 07946 705987
"There's a whale there's a whale there's a whale fish" he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users