please write a script to find the text in a application.
Note: i dont know the location of that text where it is
located. just like negative testing.

Answer Posted / gangadhar reddy

a=Dialog( ).GetTextLocation("OK",x1,y1,x2,y2)
msgbox a
if a=True then
msgbox "text found"
else
msgbox "text does not found "
end if

'OK=text string to be found on app
'x1,y1,x2,y2 are the coordinates

try this once you get the result

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is standalone database?

1745


When to use descriptive programming?

591


Can anybody let me know how to test the Drag and drop feature of the column in a .net application...eg..i hav to test the drag and drog feature of a table(swftable) in a application..plze help!!

1751


What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this

1403


Please Don't mind .i want in detail the real time process i.e in each document what it contains.

1437






What is the difference between keyword view and expert view?

607


what is ODC and GDC?

7348


How many types of recording modes in qtp?

587


please give me the code for doing retesting of gmail login page using functions so the function has to give the value

1546


What is the extension of the recovery scenario file in qtp?

546


Explain calling sub procedure.

624


Explain hybrid framework with advantages and disadvantages?

541


Can we run test with out adding object in object repository? How it is possible?

542


What are the benefits of qtp?

554


If object is not recognized by qtp but the object is standard object what is your approach?

590