Micro Focus QTP (UFT) Forums
How to set value in Calc Edit Box - 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: How to set value in Calc Edit Box (/Thread-How-to-set-value-in-Calc-Edit-Box)



How to set value in Calc Edit Box - kamalakannan_anandan - 06-01-2011

Hi,

I am new to QTP, I want to set value to edit box in calc application.
Please help me to solve this problem.

Ex:
Code:
Window("Calculator").Activate
Window("Calculator").WinButton("5").Click
Window("Calculator").WinButton("+").Click
Window("Calculator").WinButton("5").Click
Window("Calculator").WinButton("=").Click
i = Window("Calculator").WinEdit("Edit").GetROProperty("text")
msgbox  i, 64,"CalcApp"

Above example is get value from edit box.

I want set value to edit box.


Thanks & Regards,
Kamalakannan Anandan


RE: How to set value in Calc Edit Box - Anand - 06-06-2011

Please check if it works with


Code:
Window("Calculator").WinEdit("Edit").setText "5"



RE: How to set value in Calc Edit Box - UFTEnthusiast - 06-06-2011

Hi,

Please find snippet below. Hope this works.

Code:
Window("Calculator").WinEdit("Edit").Set "5".

Thanks,

UFTEnthusiast