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 / kavi

Hi,

prasad's code was right.. but we should pass values for the
function sum
dim a,b,c
function sum(a,b)
c=a+b
msgbox c
end function
x=sum(3,2)

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can replace string in qtp?

576


Explain the concept of object repository and how quicktest professional recognises objects?

565


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

1357


HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...

2403


you are recording on "WINDOW 1", say it has a link if you click on that, that leads you to "WINDOW 2". If you do any manipulations on "WINDOW 2" that are automatically updated in to "WINDOW 1". But "WINDOW 1" is currently invisible. But the updations in "WINDOW 1" must also be recorded as a script in QTP. The best Example is if you update your resume in JOB STREET portal it actually happens in other window, but the previous window is automatically updated. Now does QTP help you in this types of situations? Any body can answer this question. please..... Siva

1507






How do we analyze the checkpoint results?

594


Explain the new feature of UFT regarding the export of test results?

587


i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer

3503


Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks

1424


Can we write winrunner language i.e TSL in QTP tool?

1485


Hi Friends, Would be great if you can provide the Model Question paper, Web site link or any reference s. Thanks & Regards, Byzoor,

1354


Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.

2418


How do you perform Regreession Testing?

1475


What is different command used in command Prompt while using QTP?

1756


hi nani my doubt is how does qtp process metrix related to software process.

1565