Micro Focus QTP (UFT) Forums
Checkpoint on variable - 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: Checkpoint on variable (/Thread-Checkpoint-on-variable)



Checkpoint on variable - jove1776 - 11-29-2010

Hi there QTP'ers just a basic question:

How do I set a checkpoint on a variable?

I did the following:

Code:
msgbox "Data found: " & c &  "in Column : " & i & " Row : " & j
        found = 1

Instead of using a msgbox (which was there for debugging) I want to use a checkpoint on the found variable to report whether something is found or not.

Is this possible?


RE: Checkpoint on variable - manishbhalshankar - 11-30-2010

Hi Jove,

Try something like this:
Code:
If c <> 0 AND c <> "" Then
   Reporter.ReportEvent micPass, "Data in Column: " & i & " and Row: " & j, "Data: " & c
Else
   Reporter.ReportEvent micFail, "Data in Column: " & i & " and Row: " & j, "No data"
End If

If you are fetching the data from data table, then for a perticular row-column, if there is no data; it is equivalent to "".