Micro Focus QTP (UFT) Forums
Another checkpoint question - 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: Another checkpoint question (/Thread-Another-checkpoint-question)



Another checkpoint question - bistritapcv - 04-05-2013

I am using QTP 11.00 in Windows XP.

I am testing a function to edit a customer. Before I can edit the customer, I add the customer. If the customer's telephone num already exists I will get a message like

Proposed telephone number (8005882300) already exists.

otherwise I should get something like

Customer successfully added

I can make checkpoint for the Customer successfully added case. But
if the telephone number exists, this checkpoint will fail although I can still do the test. Call checkpoint A a test to see if the text about the telephone number existing and checkpoint B the customer successfully added.

What I want to do is something like

if checkpoint(A) then
wait 0,0
else
check checkpoint(B)
end if

The wait is just a dummy statement because my actual code goes in the else block.

So the above fill work but if checkpoint A fails, the failure is still being reported and my test is failing. How can I suppress the reporting of checkpoint A failing, but still get the result to use in my if statement?
Hope this makes sense

Google did not help

p.s. for the checkpoint I use a regular expression, no text before and no text after. The regular expression works fine.


RE: Another checkpoint question - Ankesh - 04-05-2013

bistritapcv,
To supress the reporting, u can use the filter option of reporter event.
You must enable the reporter once ur task is done.

Code:
Reporter.Filter=rfDisableAll
<Your code goes here>
Reporter.Filter=rfEnableAll


Regards,
Ankesh