Question

i have a flash application. in that application, I have a menu which is recognized as graphics object by testcomplete. I want to click on a particular menu item based on text. I can get text from the graphics object using OCR. but I want to click on it also. o is there a way to get the co-ordinates based on the text and use those co-ordinates to click on the region. I know how this is done in QTP(by using gettextlocation method) but I'm looking for a similar approach in testcomplete Thank you very much in advance.

Was it helpful?

Solution

You can do it with the help of FindRectByText method of the OCRObject. If the text is found, then OCRObject's properties (FoundLeft, FoundWidth, etc.) will contain all the information you need.

It is described here ("Remarks" section) http://support.smartbear.com/viewarticle/28020/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top