Friends please let me know how id following possible in QTP:

Can I apply conditional loop on a bitmap/image or any other
checkpoint. Like if checkpoint passes then if or Else

Answer Posted / nalini

yeah..we can do this. we need to get the status of
checkpoint and use conditional statement. Below is the
sample code for that.

Reporter.Filter=3
bval=Browser("Google").Page("Google").Image("img").Check
(CheckPoint("img"))
Reporter.Filter=0
If bval Then
Browser("Google").Page("Google").WebEdit
("q").Set "bitmap checkpoint in QTP"
Browser("Google").Page("Google").WebButton("Google
Search").Click
Else
Reporter.ReportEvent 1,"check","Bitmap doesn't
match"
End if

Hope this will help you. let me know if you have any doubts.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")

1417


What is an object repository?

600


any body can you help me what is the script to automate an comand promt

1972


How is the Bitmap checkpoint different from Image checkpoint?

619


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

587






Please guide me release notes of Automation once scripts are completed

1458


what is the frame work in J-meter?

1598


What are the methods of the TextStream object that are used for reading from a text file?

1687


What is an optional step in qtp ?

632


what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?

2737


What is the syntax to call one action in another?

548


How to get Traceability matrix from TD?

668


What are the Disadvantages of shared object repository?

568


What is the difference between byref and byval in qtp?

580


Differences between quicktest professional (qtp) and winrunner?

617