Using WinAPI text recognition causing AUT to crash
My AUT has some slightly weird grids which QTP sees as GXWND objects.
I have been trying to use GetTextLocation and then clicking on the text, but using Windows API text recognition causes the AUT to crash and using OCR text recognition just returns a load of random characters and doesn't pick up all teh text in the grid.
Re: Using WinAPI text recognition causing AUT to crash
[ QUOTE ]
It's Windows XP.
It is a windows application yes. In fact I have one that is standard windows and one that is .net and it crashes both.
Mind you, if it doesn't work on Windows 7 it might be a bit pointless using it anyway.
[/ QUOTE ]
On your .net application have you enabled the .net addin in QTP.
I have never done any testing against .net applications but my experience from other types is that - if you have a compatible addin and you enable it - then getting the text properties of your objects becomes much easier and you might not have to use WinAPI nor OCR methods on your objects - the text you are after might be one of the objects properties.
I wrote a function called PrintObjectsRuntimeProperties that prints all an objects runtime properties. And you could use that to scan through and see if the text you are after is one of the properties of your object. (or just use the object spy)
See this donate use function post