what is functions in qtp?i know the userdefind &bulit
funation or i know that Private public function ?plz tell
me what is funations in qtp?how to create a funation in qtp

Answers were Sorted based on User's Feedback



what is functions in qtp?i know the userdefind &bulit funation or i know that Private public ..

Answer / kamesh

Public function : Indicates that the Function procedure is
accessible to all other procedures(functions) in all
scripts.
Private function: Indicates that the Function procedure is
accessible only to other procedures(functions) in the
script where it is declared or if the function is a member
of a class,

Is This Answer Correct ?    2 Yes 1 No

what is functions in qtp?i know the userdefind &bulit funation or i know that Private public ..

Answer / shilpa reddy

function is a set of statements written to fulfill the
functionality &for reusable purpose.
we have user defined functions categorised as public and
private functions.

public f/n:is having access to all actions and tests which
associate that function.i mean function code will be stored
in library files with .vbs xtension,before using this
function we should associate that function to our script.
private function:this is used only in the action where it
is created.(it will not work even in another actions of
same test)

Is This Answer Correct ?    2 Yes 1 No

what is functions in qtp?i know the userdefind &bulit funation or i know that Private public ..

Answer / pankaj sharma

1.Function in QTP : Function in QTP if nothing but the set
of line of code written in .vbs , .txt or in .qfl format to
which we pass n number of parameters and it return one
value .
You can add function in QTP using navigation as :
Setting > Resources
Where we can add user defined function which will be
accesible every where in QTP Suite .
To create funtion in QTP we can use funtion generator
option given in in QTP where we can set input and output
values also insert > Function Defination Genetator

Check a small example below
Call sum(8,4)

Function sum(x,y)
sum=x+Y
MsgBox sum
End Function

For any further doubt you can directly come to me on my
blog
http://quality2deliver.blogspot.com/

Is This Answer Correct ?    1 Yes 0 No

what is functions in qtp?i know the userdefind &bulit funation or i know that Private public ..

Answer / bfakruddin

Function: Function is a block of statements which is used to
perform a particular task and we can call from any test and
pass parameters from calling function and get the result
from called function.

Function returns Single value, we can pass no.of input
parameters and get no.of output parameters and use that
output parameters in tests, But returned value would be on
function name, i.e. the return value at calling function
We can declare function in function

No need to explain about public and private functions in
interviews until unless they ask about the differences.
many interviews they ask differences between sub procedures
and function procedures.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

What is the difference between keyword driven frameworkd and Modularisation framework?(Chandana)

5 Answers   Wipro,


What is the difference between CVS and VSS? Are you store QTP SCRIPT In VSS OR CVS? Where you store QTP Script?

1 Answers   Brain Roots, Ordain Solutions,


how to make connection to a remote mysql database in qtp any one can please provid eme deatail steps.

1 Answers  


Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points

0 Answers   BirlaSoft,


What is meant by Repository?

7 Answers   ALFiNE IT Solutions, Four soft,






what are the areas that cannot be tested using an automated tool? list a few

3 Answers  


What is text/text area checkpoint?

0 Answers  


Anybody can tell me what are the common roles and responsibilites of a Automation Test engineer

2 Answers   IBM,


What is object state in trigger events,in recovery scenario.write a script to handle this.

0 Answers  


Hi,EXCEL SHEET AND DATA TABLE . BOTH ARE SAME OR NOT?

3 Answers  


write a qtp code to display all the items in the fly from combo box or list box

3 Answers  


what is the criteria for choosing test cases for automation? Ex: if you have some 300 test cases, then how many you choose for automation. what is criteria of selecting?

3 Answers   Aricent, Delhi University, TCS,


Categories