Micro Focus QTP (UFT) Forums
GetTextLocation method - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: GetTextLocation method (/Thread-GetTextLocation-method)



GetTextLocation method - elsekra - 03-12-2009

Hi ,
I am using GetTextLocation method to get the 4 coordinates of the text in the window :
Code:
r=Window("Main Entry Login Window").GetTextLocation("User", a,b,c,d, false)
values of a,b,c d are the coordinates of the text .
I want to find the right mouse coordinate to use Click methode
....Click X, Y

Do you know how to get X,Y from the coord a,b,c d
Thx


RE: GetTextLocation method - MVChowdary - 03-12-2009

Hi,
Here is the code to get the window X and Y coordinates.

' for X coordinates
Code:
xCor =Window("Main Entry Login Window").GetROProperty("x")

' for Y coordinates

Code:
yCor =Window("Main Entry Login Window").GetROProperty("y")