Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set value in Calc Edit Box
#1
Solved: 10 Years, 9 Months ago
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
Reply
#2
Solved: 10 Years, 9 Months ago
Please check if it works with


Code:
Window("Calculator").WinEdit("Edit").setText "5"
Reply
#3
Solved: 10 Years, 9 Months ago
Hi,

Please find snippet below. Hope this works.

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

Thanks,

UFTEnthusiast
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to set value in application web edit box tanuj dewangan 4 3,471 07-29-2016, 03:58 PM
Last Post: harshadevadas
  Edit Recovery Scenario skegler 0 3,108 03-05-2014, 10:40 PM
Last Post: skegler
  Not able to edit existing scripts in QTP 11 prit deo 1 3,715 02-14-2014, 11:20 PM
Last Post: supputuri
  Link besides to any edit field prempujaripati 2 2,594 02-25-2013, 10:01 AM
Last Post: vinod123
  Data not getting entered in web edit box. anupam4j 8 9,579 01-07-2013, 03:39 PM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)