12-07-2009, 04:36 PM
Hi All,
Here is my code on a simple calculator application.
I am using QTP 9.2.
Option Explicit
Quen: cant I pass the variable click1 directly to the statement with out giving Cstr? Window("Calculator Plus").WinButton(click1).Click
But the problem is even I give Cstr, QTP shows an error at this statemnt- object "4" is not found ....
Could any body help me ASAP please
Thanks
Swetha
Here is my code on a simple calculator application.
I am using QTP 9.2.
Option Explicit
Code:
SystemUtil.Run "calc.exe"
Dim click1,click2, click3, click4,result
click1= inputbox("Enter 1st number")
click2= inputbox("Enter 2nd number")
click3= inputbox("Enter 3rd number")
click4= inputbox("Enter 4 th number")
Window("Calculator Plus").WinButton(Cstr(click1)).Click
Quen: cant I pass the variable click1 directly to the statement with out giving Cstr? Window("Calculator Plus").WinButton(click1).Click
But the problem is even I give Cstr, QTP shows an error at this statemnt- object "4" is not found ....
Could any body help me ASAP please
Thanks
Swetha