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 |
wht is the difference between action and functio?
what is the difference between QTP 8.0 & 9.0?
Hi .. i want to write the script for the combo nox list . For example if any combo box having a multipul itme. So how can i retrive each item for each iteration ? help me out .
In a web site, Protocal has been changed http: to https: what is your approach?
Can we use Virtual Objects in Discriptive Programming?
can we use QTP for load testing instead of load runner?
Which advantages helping QTP to hold the position of "Market Leader" for such a long period?
I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????
Dear sir, i want to perform a QTP automated testing for mechancial engineering software like msc adams, msc nastran this softwares will help for mechanical engineering design analysis>> i know oad runner win runner, test director, QTp>> but i dont know how to use for automation
Can anybody give the script of below things. 1. Add sheet 2. Adding columns 3. Set the values in that columns(In the rows) 4. Close the sheet 5. How can we create 3 sheets in one Excel sheet??
How to export QTP results to an .xls file?
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)