what is diff b/w function and action?
Answers were Sorted based on User's Feedback
Answer / gaurav
a function is VB Specific, whereas action is QTP specific.
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / siqtp
1.Action is QTP specific whereas Function is VBScript
specific
2.A function can be called from an Action,But an Action
cannot eb caleed from Function
3.Actions can be associated with OR,DataTables etc where as
Functions cannot
4.Actions can be created and stored only from QTP where as
Functions can be created and saved anywhere inside or
outside QTP
5.Functions can be loaded to memory and then execute which
makes the performance of functions better whereas Actions
cannot be loaded to memory
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ganesh kumar
Function can return a single value wheras actio can create
multiple values at a same time
Is This Answer Correct ? | 3 Yes | 2 No |
When ever u call the (external) Actions, respective OR,
Datatable, Active screen, check pts if any, will come to
your current test, but if u call a function only a peice of
code will come.
Actions are (most) useful when u r using per action repo.
functions are (most) useful when ur using global repo.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / deven
♦It returns single value.
♦ we can call functions within actions but we can't call
actions within functions
♦ Generally functions are saved with ".vbs" extension
whereas actions will save with ".mts".
♦ Every Action will have its own Datatable whereas function
does not.
♦ Action can have a object repository associated with it
while a function can't. A function is just lines of code
with
some/none parameters and a single return value while an
action can have more than one output parameters.
♦ Action can contain Object Repository, Data table, Active
screen etc. whereas function do not have these features.
♦ Action is internal to QTP whereas Function is just lines
of code with some/none parameters and a single return value.
♦ Action can/cannot be resuable whereas functions are
always reusable.
♦ Action Parameter have default values whereas VB script
functions do not have any default values.
♦ Action parameter type are byvalue only where vbscript
functions can be passed byref.
♦ Action can have multiple output(returning) values whereas
function can return only single value.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / anna
both will perform the same functionality but both r having
advantages and dis advantages
Is This Answer Correct ? | 0 Yes | 4 No |
Answer / srinivas
Function Can return a value
Action is value can't return a value.
Is This Answer Correct ? | 0 Yes | 6 No |
Answer / praveen
Function can return a value.
Action can't return a value.
Is This Answer Correct ? | 0 Yes | 7 No |
What is the logic for reading(exporting)the data from flat files to QTP?Can anyone explain me with an example? I appreciate it!!! Thanks!!! Prasanna
i am new to qtp i do not know how to write script how to write the code to login if it fails how to able error messages
for example u can take ebay or plifcart online shoping web application--------- write acode in vbscript in qtp---- search box and write (iphone6)and click on go button then opened diff prise iphones in next page but u can select 30,000 to 90,000 list pls write code?
2 Answers FFASVA, Genpact, Wipro,
In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?
Hi, i want download attached files in test plan area from QC to local drive in my system using QTP script. Please help me
dar Sir I am Facing th eProblem in QTP thet ,when I start thrcording inthe QTP for the ASP front end and C# the Coding Language I fing that recording is Done well for the Login screen but at the Time Running the script the QTP is Unable to Identify the Objects On the Objec Onht eLigin screen .Please answer the Question in Description and the Propables reason I might be facing alsp the Popable solution I have to Take thanks and ragards
Where virtual objects stores results?
explain structured testing? plz guys with exp. do answer
How to display the first 3 letters in these "ABCDEFGH" using qtp script?
Diff between WEB APPLICATION AND CLIENT-SERVER APPLICATION?
Hi all. Could anyone tell me the difference between an Action and a Function in QTP. Thanks in advance and Merry Christmas.
How will u find that how many List boxes( and check boxes) are present in one particular window