Help Regarding GetTextLocation
Hi all, how do we get to know the co ordinates of a Search text from QTP, which occurs more than once.
or how do we know the No.of occurances of a text on a page???
i was trying with below code.
<font class="small">Code:</font><hr /><pre>
l = -1
t = -1
r = -1
Set GameRef=Window("regexpwndtitle:=Microsoft Internet Explorer","text:="&InputLink&".*").WinObje ct("Object class:=MacromediaFlashPlayerActiveX")
If GameRef.Exist Then
result =GameRef.GetTextLocation("Spin", l, t, r, b)
If result Then
MsgBox "Text found. Coordinates:" & l & "," & t & "," & r & "," & b
x = (l+r) / 2
y = (t+b) / 2
when i run this script this will identify the first occurance of "Spin", but how to get the Nth occurance of Random Button.
In my case "Spin" is found two times as
1.Last Spin as Plain text and
2.Spin - A button
i need to click on Spin Button , where as it is clicking on Last Spin Plain Text.