Micro Focus QTP (UFT) Forums
Question about a specific checkpoint I'm trying to create - 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: Question about a specific checkpoint I'm trying to create (/Thread-Question-about-a-specific-checkpoint-I-m-trying-to-create)



Question about a specific checkpoint I'm trying to create - DanielElsner - 06-04-2011

I want to create a checkpoint that looks for a certain image on a webpage, and if it can't find it, then the checkpoint is passed.

My reasoning is this. In a settings window I set something to be read only, and when it is set to read only, when I view that object, some buttons should not exist that do exist when it is not in read only mode.

Thus, I want to have a checkpoint that searches for these buttons that should not exist, and when it can't find them, it passes.

Thanks


RE: Question about a specific checkpoint I'm trying to create - DanielElsner - 06-06-2011

Anyone? Is this possible?


RE: Question about a specific checkpoint I'm trying to create - tdevick - 06-07-2011

Code:
result=Browser("Automation Site | Edit").Page("My Site").Image("help icon").Check( CheckPoint("about"))
if result then ' button found - checkpoint passes
   Reporter.ReportEvent micFail, "Step 3, "The help icon was found when not expected"
   ExitAction
Else ' checkpoint failed - button NOT found
    'do some other stuff
End If