I have been assigned the task of converting scripts from QTP version 8.2 to a different testing tool (not my choice, just the task I have been assigned). We are testing a Terminal Emulator type application.
In the existing scripts, the GetVisibleText function was used to capture the text currently displaying on the entire screen but I can't figure out how this was working. I have used multiple SPY tools and none of them show the text of the window as a property that could be captured.
So how is it possible that GetVisibleText was able to get the text? What is it actually doing behind the scenes? I was thinking I could manually duplicate the windows API calls it does to capture the text if needed but I can't find any API call that works. Is it possible that GetVisibleText was actually performing some type of OCR function?
The screen in the Teminal Emulator appears to be a custom ActiveX control.
Yes, GetVisibleText performs an OCR function. It's also not terribly reliable, as Mercury/HP say so themselves in the help. It's a method of last resort.