I'm using TextUtil.GetTextLocation on a form and it seems to be incredibly inconsistent.
The text is always there and I run it five or six times and on some occasions it finds the text and returns the coordinates, while on other occasions it returns false. Sometimes it finds the text but returns a negative number for one or more coordinates.
Are there any ways to make the funciton a bit more robust?
Looks like this method isn't reliable. Check this note in Help file.
[ QUOTE ]
When possible, it is recommended to use alternative methods of capturing text instead of using the TextUtil object. For example:
Use the GetROProperty method or the Object property to retrieve the value of the text (or equivalent) property from an object in your application
Use a text or text area output value step to retrieve text or a text or text area checkpoint step to verify a text value.
Use the GetVisibleText or GetTextLocation methods of the appropriate test object.
Basically, you have a chart object and a legend box object. The legend box object has a load of squares which correspond to different date series in the graph. When you click on a legend box, it shows a graph for a different date series.
I'm trying to find a way to select different dates other than using GetTextLocation and clicking.
There doesn't seem to be a method or property in the .net object members that does this.