ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
I am just a beginner in QTP. Could any one explain me in 
detail how to automate adding two numbers and getting the 
result in QTP. Also I would like to parameterize the 
inputs. I have tried but getting an error like 'Can't use 
sub.....'(can't recollect the exact error)
 Question Submitted By :: KK
I also faced this Question!!     Rank Answer Posted By  
 
  Re: I am just a beginner in QTP. Could any one explain me in detail how to automate adding two numbers and getting the result in QTP. Also I would like to parameterize the inputs. I have tried but getting an error like 'Can't use sub.....'(can't recollect the exact error)
Answer
# 1
you can write function to add two numbers and call in qtp.

file-->New-->function Library

Public function add(a, b)
   add=a+b
End Function


Save it where ever u want with add.vbs

Now File-->settings-->Resources-->Add function library--
>click at add(+) button below one button will appear click 
that and add the saved library file(add.vbs).
 
in qtp normal file 

write print add(4,5) and u can parameters as your wish.



add this in
 
Is This Answer Correct ?    0 Yes 0 No
Ram
 
  Re: I am just a beginner in QTP. Could any one explain me in detail how to automate adding two numbers and getting the result in QTP. Also I would like to parameterize the inputs. I have tried but getting an error like 'Can't use sub.....'(can't recollect the exact error)
Answer
# 2
One way is:Dim a,b,c
a=10
b=20
c=a+b
msgbox c

Anotherway:Place the input parameters in these: edit-
>Action Properties->Parameetrs->Here we can add input & 
outputparametrs.
Dim a1,b1
a1=Parameter("a")
b1=Parameter("b")
c=a1+b1
msgbox c

Aliter: Add the values of both a,b of parameters in Action 
Properties.
 
Is This Answer Correct ?    0 Yes 0 No
Sailaja
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How to map Test cases to the script? Please do anwser urgently?Thanks  3
What is object identification? Wipro2
what is the purpose of .vbs file? HCL2
Error handling Wipro2
How many type of status messages are there ..explain?  4
How to do Batch run in qtp? provide the steps?  4
What is Terminal Emulators”? Why we used in QTP.? How he works on QTP.  1
we have 10 actions in out test how can we convert 9th action is main action ? how ?  5
In a web site, Protocal has been changed http: to https: what is your approach?  2
CAN ANY ONE PLEASE EXPLAIN DIFFERENT TYPE OF FRAMEWORKS USED IN QTP?EXPLAIN EACH OF THEM?..POST TO VANILKUMAR_1981@YAHOO.CO.IN  1
what is a file system object in QTP  3
what are the difference between qtp8.2 to 9.0 surya Bally-Technologies1
what is the mediater between qtp and application/project in automation testing?  1
anyone can explain about "Hybrid framework" in QTP  2
hi this is srinivasa(from blr) i complited my B.tech(e.c.e) in 2007 im searching job in s/w testing but idont have freshers resume for s/w testing please send some s/w testing resume for me(fresfers resumes only) advns thnks you  2
I m new to QTP? Is it necessary to know VB for learning QTP for Automation? Can I understand QTP excellently Without practical automation?  2
how can i call an external action,which is not added external action of an action? Ordain-Solutions2
What is an Custom Object in QTP ?  1
i have .xls,.txt,.doc files are there (together). i want find only .xls file among them? how can we write function? CTS2
1. Can anyone help me with recovery scenarios, each type with examples and also what is on error resume next?  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com