hi,
i was adding the two numbers in qtp scripts but i didn't get
the answer. see my below script, i dont know wht is the problem.
i passed the value a=3 b= 2, i got the ans 32 instead of 5.
i thing the problem is to be c = a+b
my mail id karthis4u@gmail.com
Dim a, b, c
a = inputbox("enter the a ")
b = inputbox("enter the b ")
c = a + b
print c
Answer Posted / debee prasad kar
u have to use CINT function which is a conversion
function.If we not use this function then whatever we enter
in inputbox that will be treated as sting.so CINT function
converts from string to integer.
Code:
dim a,b,c
a= cint(inputbox("enter the first number"))
b= cint(inputbox("enter the second number"))
c=cint(a+b)
msgbox c
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
how will load the object during runtime?
How can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is
How to replay a script in qtp?
unique properties of button,edit box, radio button,check box?
How to modify object property in qtp ?
How you can replace string in qtp?
How to handle Java tree in QTP?
How to save your test using quicktest professional (qtp)?
How to use conditional loops in qtp ?
Explain the new feature of UFT regarding the export of test results?
hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?
How many types of recording modes in qtp? Which will be used when?
Which functionalities of QTP used in banking project?