Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to handle login failure in QTP
#1
Solved: 10 Years, 9 Months ago
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
Reply
#2
Solved: 10 Years, 9 Months ago
Hi Rohit,

You can use recovery scenario to achieve this.
Reply
#3
Solved: 10 Years, 9 Months ago
(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.
Reply
#4
Solved: 10 Years, 9 Months ago
Its is a qtp error message
Reply
#5
Solved: 10 Years, 9 Months ago
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.
Reply
#6
Solved: 10 Years, 9 Months ago
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 .
Reply
#7
Solved: 10 Years, 9 Months ago
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.
Reply
#8
Solved: 10 Years, 9 Months ago
Code:
Browser("Browser").Page("Page").WebEdit("login[username]").Set DataTable("UserName", dtGlobalSheet)
Browser("Browser").Page("Page").WebEdit("login[password]").SetSecure DataTable("Password", dtGlobalSheet)
Browser("Browser").Page("Page").WebButton("login").Click


Browser("Browser").Page("Page_2").Link("Overview").Check CheckPoint("welcome")



Browser("Browser").Page("Page_2").Sync
Browser("Browser").Close
Reply
#9
Solved: 10 Years, 9 Months ago
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.
Reply
#10
Solved: 10 Years, 9 Months ago
on checkpoint check
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can UFT Handle Detecting Redirects? zunebuggy 0 776 05-28-2020, 06:50 PM
Last Post: zunebuggy
Exclamation Login & logout in Siebel and clicking pop-up button yuetling926 7 10,699 07-09-2014, 10:43 PM
Last Post: hhamilton
  Unable to Click on Login Button Paurav 1 3,161 07-03-2014, 05:27 AM
Last Post: supputuri
  for help.Run a test to login,and then it didn't jump to another page maosilu 0 2,586 11-01-2013, 01:27 PM
Last Post: maosilu
  How to handle pop up blocker. chetan-24 4 8,372 06-08-2012, 09:10 PM
Last Post: nilanjans

Forum Jump:


Users browsing this thread: 1 Guest(s)