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 type of automation frame work you are using?and why?

2 Answers   Wipro,


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

0 Answers  


Why you are Using Descriptive programming instead of Object Repository?

11 Answers  


Hello friends can anybody tell me about the architecture of QTP with diagram of it.this architecture is same for any domain like ERP/Banking/CRM/Healthcare or it's different then please tell me.thanks

4 Answers   Fidelity,


How do we count the no of mails in Yahoo Inbox for a specified week?

0 Answers  






Q) Please any body can help me how we can create descriptive programming if the application is not ready i.e we don't have unique property of object ? note:build not ready means we can't use object spy in build to get unique property .

2 Answers  


What is Description Object?

1 Answers  


How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?

2 Answers  


How we can add actions in the test using QTP?

5 Answers  


Explain the Keyword View ?

2 Answers   Crea,


Explain about the Test Fusion Report of QTP ?

1 Answers  


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

0 Answers  


Categories