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
Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln
Is it possible to call from one action to another action in qtp?
What is a programmatic description?
hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?
What is the difference between a Function and Action in QTP?
Explain how Does Run time data (Parameterization) is handled in QTP?
Give me some real time point of way where exactly we can conduct audits?
What are the different types of recording modes in qtp? Which will be used when?
wt is the use of multiple questions in QTP
what is the diff b/w assistive and mandatary rules of object repository in QTP???
Discuss the QTP Environment?
What is optional step in qtp? How you can add optional step in qtp?
What are parameterizing tests?
Differentiate the type of test cases which can be automated and which cannot be automated?
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans