Posts: 8
Threads: 2
Joined: Mar 2011
Reputation:
0
04-06-2011, 03:50 PM
(This post was last modified: 04-06-2011, 03:50 PM by Rohit.)
Hello Guys ,
I need to Test that if all users in the data table can login to the application
on giving the invalid user name or bad password the welcome page is not displayed and Tests fails while giving the object not found error .
How can i handle this that If one ligin gets failed the script go to next iteration
Posts: 189
Threads: 0
Joined: Jul 2009
Reputation:
1
04-06-2011, 04:02 PM
Hi Rohit,
You can use recovery scenario to achieve this.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-06-2011, 04:06 PM
(This post was last modified: 04-06-2011, 04:07 PM by basanth27.)
(04-06-2011, 03:50 PM)Rohit Wrote: Hello Guys ,
I need to Test that if all users in the data table can login to the application
on giving the invalid user name or bad password the welcome page is not displayed and Tests fails while giving the object not found error .
How can i handle this that If one ligin gets failed the script go to next iteration
Is it a QTP Error or an Application error?
(04-06-2011, 04:02 PM)manishbhalshankar Wrote: Hi Rohit,
You can use recovery scenario to achieve this.
Manish -
From the error "object required" it looks like it is QTP error. Although i am not sure, would wait for the questioner to clarify further. However, assuming it is, i am really curious to know as to how could we apply recovery scenario in this case?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 8
Threads: 2
Joined: Mar 2011
Reputation:
0
04-06-2011, 04:11 PM
Its is a qtp error message
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-06-2011, 04:13 PM
You can over come the error using,
On Error Resume Next.
However, you will need to consider this valid failure as a case of pass because you are validating scenarios in a pretty awkward way. If i were you, i would rather check for the objects existence than try to find that object which validates the object.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 8
Threads: 2
Joined: Mar 2011
Reputation:
0
04-06-2011, 04:17 PM
ok .can You give me an example in form of code that how will you do that? I shall be very thankful to you then .
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-06-2011, 04:54 PM
I would be really thankful if you can poste the code you are trying. I will be more than happy to modify that for you.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-06-2011, 05:12 PM
Where is the error? On the login click or the checkpoint check?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.