Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fail a test if the checkpoint passes
#1
Solved: 11 Years, 3 Months, 2 Weeks ago
I have the below code in my script. I would like to fail the test if the checkpoint passes. That means , if a particular unwanted text is displayed on the page, then I want to fail it. So I inserted a check point to check if the unwanted text is present. But when it is present the check point is passing and the test is also passing. Could you please suggest how to resolve this issue. How to find out what has been retunred to 'a'.?

Code:
a=Browser("Name").Page("Page").WebEdit("edit box").Check (CheckPoint("error"))

Code:
If a = Pass  Then
    reporter.ReportEvent micfail , "arrival date", "todays date not displayed"
End If
Reply


Messages In This Thread
How to fail a test if the checkpoint passes - by aaa - 01-28-2010, 03:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get the Parent Folder name in Test Plan for a Test from Test Lab using QTP godsown 0 6,108 09-29-2011, 04:55 PM
Last Post: godsown

Forum Jump:


Users browsing this thread: 6 Guest(s)