Micro Focus QTP (UFT) Forums
How to handle bad login - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to handle bad login (/Thread-How-to-handle-bad-login)



How to handle bad login - gerfred - 07-01-2010

Hi,

I try to test a login page.

I've a Login action, filling username and password using global datatable
It is followed by a logout action (just a logout click)

I'm able to check good login/pwd pairs but how to manage bad login/pwd?

I mean when bad username/password pair is provided an error message is provided (this is normal) so test for this pair should stop. So how can i stop it without rrying to call logout action ?

thanks,


RE: How to handle bad login - sreekanth chilam - 07-01-2010

Hi Gerfred,

Use "Utility statements" such as ExitTest Statement.


RE: How to handle bad login - Tarik Sheth - 07-02-2010

Hi,

you mean you want to end the test iteration and go to the next row of the data table, if so you can use
If Pass then
exitTestIteration

Or can also use

DataTable.SetNextRow


RE: How to handle bad login - gerfred - 07-02-2010

thanks for your help


RE: How to handle bad login - Arun Prakash - 07-10-2010

Hi gerfred ,

After entering user id and password we need to check the existance of the home page.If it is not navigated log the result as fail.