Hi mamtha lalith, 

As I see it you have done a half test.

First Call your Start-URL:
<invoke description="get Login Page" url="/"/>
Check the Title of the Page:
<verifytitle description="we should see the login title" text="###Title###" 
regex="true"/>
Set u/n and password
<setinputfield description="set user name: #{chewi.user}" name="loginName" 
value="#{chewi.user}"/>
<setinputfield description="set password" name="password" 
value="#{chewi.password}"/>
Click Submitt:
<clickButton description="Click the submit button" label="${button.login}" />
Check the successfull Login!!!! Like store the cookie:
<storeCookie description="storecookie" name="JSESSIONID" 
property="webtest.cookie.jsessionid"/>
<verifyProperty description="verify cookie" name="webtest.cookie.jsessionid" 
text=".*" regex="true"/>
Check the first page of your application.
<verifytitle description="Startseite" text="Schreibtisch.*" regex="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,
> > 
> > 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="Welcome" url=""/>
> >                     <setInputField description="set username"
> > value="${Login ID}" name="id"/>
> >                     <verifyInputField description="set username"
> > name="id" value="${Login ID}" />
> >                     <setInputField description="set 
> password" value="a"
> > name="password"/>
> >                     <verifyInputField description="set password"
> > name="password" value="a"/>
> >                     <clickButton label="Sign In" 
> description="Click the
> > submit button"/>
> >                     
> >             </steps>
[...]

Mit freundlichen Grüßen
------------------------------------------------------------------------
Michael Habbert

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

Tel: 0721 / 920 60 21
Fax: 0721 / 920 60 30
E-Mail: [EMAIL PROTECTED]
www: http://www.netpioneer.de
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to