I want a checkpoint to delay a test when it fails at a checkpoint and let me know. When I run it from QC, it doesn't pop up the normal failed message. Is there any way to do this?
Answer by Rich Text · Dec 06, 2012 at 09:53 AM
Luckily, all checkpoints in QuickTest return True/False when they execute. You can use this to invoke your own messages by including a simple If/Then statement and a VBScript MsgBox command. Please notice that the checkpoint statement is modified slightly from the original checkpoint statement with added parenthesis. These are used because we are returning a value back to a variable:
retVal = Browser("MSN").Page("Welcome...").Check(CheckPoint("Login")) If retVal = False Then MsgBox "The checkpoint failed." End If
Of course, using that logic, you could enhance it to use an Else statment as well if you wanted to do something if the checkpoint passed, etc., but this will give you the basics.