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


Code:
Window("Calculator").WinEdit("Edit").setText "5"
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks 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,687 07-29-2016, 03:58 PM
Last Post: harshadevadas
  Edit Recovery Scenario skegler 0 3,284 03-05-2014, 10:40 PM
Last Post: skegler
  Not able to edit existing scripts in QTP 11 prit deo 1 4,048 02-14-2014, 11:20 PM
Last Post: supputuri
  Link besides to any edit field prempujaripati 2 2,703 02-25-2013, 10:01 AM
Last Post: vinod123
  Data not getting entered in web edit box. anupam4j 8 10,089 01-07-2013, 03:39 PM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)