AW: [Webtest] help login page - yes

Michael Habbert Michael Habbert" <Michael.Habbert@netpioneer.de
Fri, 8 Dec 2006 08:40:14 +0100


Hi mamtha lalith,=20

As I see it you have done a half test.

First Call your Start-URL:
<invoke description=3D"get Login Page" url=3D"/"/>
Check the Title of the Page:
<verifytitle description=3D"we should see the login title" =
text=3D"###Title###" regex=3D"true"/>
Set u/n and password
<setinputfield description=3D"set user name: #{chewi.user}" =
name=3D"loginName" value=3D"#{chewi.user}"/>
<setinputfield description=3D"set password" name=3D"password" =
value=3D"#{chewi.password}"/>
Click Submitt:
<clickButton description=3D"Click the submit button" =
label=3D"${button.login}" />
Check the successfull Login!!!! Like store the cookie:
<storeCookie description=3D"storecookie" name=3D"JSESSIONID" =
property=3D"webtest.cookie.jsessionid"/>
<verifyProperty description=3D"verify cookie" =
name=3D"webtest.cookie.jsessionid" text=3D".*" regex=3D"true"/>
Check the first page of your application.
<verifytitle description=3D"Startseite" text=3D"Schreibtisch.*" =
regex=3D"true" />

This is the main source of our login-modul we use in each test.
Hopefully it helps
Yours
Michael Habbert

[...]
> mamtha lalith wrote:
> > hello everyone,
> >=20
> > i have been looking at canoo webtest since past 4 5
> > days and it looks really intresting as i wanted to use
> > for my project.
> > i have written some xml files to test my application
> > with around 75% of success.
> > my first page is a login page so i wrote the following
> > module
> > <steps>
> > 			<invoke description=3D"Welcome" url=3D""/>
> > 			<setInputField description=3D"set username"
> > value=3D"${Login ID}" name=3D"id"/>
> > 			<verifyInputField description=3D"set username"
> > name=3D"id" value=3D"${Login ID}" />
> > 			<setInputField description=3D"set=20
> password" value=3D"a"
> > name=3D"password"/>
> > 			<verifyInputField description=3D"set password"
> > name=3D"password" value=3D"a"/>
> > 			<clickButton label=3D"Sign In"=20
> description=3D"Click the
> > submit button"/>
> > 		=09
> > 		</steps>
[...]

Mit freundlichen Gr=FC=DFen
------------------------------------------------------------------------
Michael Habbert

Senior Developer
Netpioneer GmbH, Beiertheimer Allee 18, D-76137 Karlsruhe

Tel: 0721 / 920 60 21
Fax: 0721 / 920 60 30
E-Mail: michael.habbert@netpioneer.de
www: http://www.netpioneer.de