04-05-2013, 01:40 AM
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.
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.