Micro Focus QTP (UFT) Forums
Get To property - 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: Get To property (/Thread-Get-To-property)



Get To property - rajeshdizzy - 07-08-2009

Hi all....
i used calculator to check using the getroproperty.can anyone help me how to check using the gettoproperty and getvisibletext for the same example.

Code:
systemutil.Run("C:\Documents and Settings\kAG-Trainee\Desktop\calculator")
window("Calculator").WinButton("9").Click
window("Calculator").WinButton("+").Click
window("Calculator").WinButton("6").Click
window("Calculator").WinButton("=").Click
a=window("Calculator").WinEdit("Edit").GetROProperty("text")
msgbox a

Thankz in advance
Quality Analyst
L.Rajesh
+919840149551


RE: Get To property - supputuri - 07-10-2009

Hi Rajesh,

We will use GetToProperty to see the property values that are there in the OR for the specified object.
For Eg:
Code:
systemutil.Run("C:\Documents and Settings\kAG-Trainee\Desktop\calculator")
window("Calculator").WinButton("9").Click
'This will return the native class property value from OR for winbutton '9'.
msgbox Window("Calculator").WinButton("9").GetTOProperty("nativeclass")
window("Calculator").WinButton("+").Click
window("Calculator").WinButton("6").Click
window("Calculator").WinButton("=").Click
msgbox Window("Calculator").WinButton("2").GetTOProperty("nativeclass")
Please let me know if you need any more info.
Thanks,