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 main differece between QTP 9.0 and 9.2
If enter into interviewer room? how u introduce with him. with shakehand or waht?
How software tester can use constants and variables in scripts?
While creating Recovery Scenario for Pop-up window..In 'Recovery operation' we have to call a function. Can u tell me that function.
4 Answers Alcatel-Lucent, Ordain Solutions,
Hi, How to invoke QTP or any application through Command Prompt without using Vb script and batch file.... Reply me Srinivas
what are the areas that cannot be tested using an automated tool? list a few
when we right click on the desktop of any operating system we find a menu , consisting of refresh,edit,open,paste and cut etc... how to load the object and object properties of that menu in QTP
QTP Query: Hello to all, I'm getting an error (as below) when I perform descriptive programming on any Web application. "The test run cannot continue due to an unrecoverable error.The "myvar_0" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object " But I do not have any problem when I perform the same descriptive programming on a Windows application such as Sample Application - Flight. Previosly , I had prepared a lot of scripts - both via creating the properties collection object and by giving the description in string arguments and implemented them on Flight and they're working perfectly fine.I'm using QTP Version 9.2 The sample script I have used for Web application is as below : Set myvar_0 = Description.Create 'Setting property collection object for Browser myvar_0("class").value = "Browser" myvar_0("name").value= ".*" 'Setting property collection object for Page Set myvar_1 = Description.Create myvar_1("class").value = "Page" myvar_1("name").value= ".*" 'Setting property collection object for Text box Set myvar_2 = Description.Create myvar_2("class").value = "WebEdit" myvar_2("name").value= ".*" 'Setting property collection object for Button Set myvar_3 = Description.Create myvar_3("class").value = "WebButton" myvar_2("name").value= ".*" SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe" Browser("myvar_0").Page("myvar_1").WebEdit("myvar_2").Set ("hello how are you ?") Browser("myvar_0").Page("myvar_1").WebButton ("myvar_3").Click Browser("myvar_0").Page("myvar_1").Sync Browser("myvar_0").Close As our application is a Web based application, I was planning to make a few changes in regards to the object names, but unfortunately I am getting the above mentioned error. Could anyone please advice me, whether it could anything to do with the run setting or anything else.I am getting the same error even while implementing on our Sample Application - Mercury Tours website. I would be grateful to anybody who can solve my problem !!
Wht is Smart Identification Mechanisam in QTP..Actually when do we this Technology means during Recording or running ....how is technology works. Anybody can expalin this .....Thanks in advacne
Explain the difference between call to action and copy action?
Can we run test with out adding object in object repository? How it is possible?
How to retrieve value (data) from notepad using QTP ?