Function:- function is a group of methods and instruction
and it can be access whenever we call that function
Action:- action is use to split our test script into more
flexible and logical unit advantage:- 1.if we require a
particular step of our test script then we can use action
by making it reusable action. 2. if 2 or more than two
scripts require the same script then we go for the action
Action -> Action is nothing but a script written for certain
function point .
Action types ; Non-reusable , reusable , external
Action may return multiple values .
Action requires its own object repository( requires objects)
Actions concept i restricted to QTP only ..
Function -> it consists of Set of statements written to
achieve a particular task.
Function returns one value.
Functions concept is used all programming
languages,scripting languages.
Types of functions in QTP->Built in ,Local Script,Library
functions.
WIthout using objects Functions can be written ( in
descriptive programming )
the difference between action and function is
action has object repository.
function doesnot have object repository.
we can edit copy of actions.it may not effect on main action
we cannot edit the copy of function. it my effect on main
function.
Action will have object Repositery associated with it
Function will not have .
Function has only one return value
Action can have many return values
A function can be external declared and called from
liberary files.
Action cant.
any Query contact : prataphs@gmail.com
1.FUNCTION WILL RETURN ONLY SINGLE VALUE BUT ACTION CAN
RETURN MORE THAN ONE VALUE.
2.ACTIONS CAN USE IN OTHER ACTION AS FUNCTIONS BUT WHEN WE
COPY THE ACTION IN OTHER ACTION AND EDIT THAT ACTION ...iT
WILL EFFECT THE MAIN FUNCTION BUT FUNCTION CANT.
3. ACTION IS OBJECT REPOSITORY ABUT FUNCTION DONY
Actions can Return mutiple values, where as function will
return one value
Check points insertion wont be possible in functions where
it can be possible in Actions .
functions can be called outside the tool , where as Actios
are called only within QTP
scripts written in higher version of qtp wont be compatable
with Actions , where as functions since they are not QTP
related can be work in any version
functions can be even written in notepad , wiht .vbs file
name
ex :
Public Function F1
msgbox(" I am function")
end function
call F1
run the code in notepad and verify
Action- Action is nothing but a step performed by user.
Action is catagorized in two parts
Reusable action,usable action.
Function-In that action what functionality u r written to
check that function is working properly or not.
e:g - if you write a script for the login page,the total
script is written for the login page is a action,and the
script was written for the login page is the
function,because main functionality in the script is login
the page.
if it wrong reply me
1. Function is a feature of Vb Script whereas Action is specific to QTP.
2. Action is associated with object repository whereas Function is not associated with object repository
3. Function can have at maximum one output value whereas Action can have many outputs.
4. Functions is just logical instructions which are not associated with objects whereas Action is associated with objects
i am entering wrong data or wrong password in a text box and
click on submit button .i am getting a popup window with a
message Please enter the correct password or data .How can i
handle this situation by using QTP.
Hi friend
I have query regarding QTP datatable.
I want to insert data in datatable during runtime.
suppose i wrote
datatble.value(1) = "Test data"
so when i run the script it says column(1) doesn't exist.
Then i write something in column A1 manualy and run the
script again.
Now it works fine.
Pls clarify how i can put value in blank cell of datatable.
please tell me how to identify the index of the link in the
web table .links are not constant.example i want to click
the link in the inbox ,search the item and click the
partcular mail.(mail links count is not constant)
Hello Everybody,
please tell me how to use accessibility checkpoint and XML
checkpoint by giving any practical example of it.please
provide me the steps to perform that and also pls provide
the code too.
Thanks in advance,
Gaytri
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
hi friends i have 4 yrs exp in testing and 2 yrsexp in
QTP.currently aim working in mnc in north as a permanent
employer .iam looking for job in south is there any
openings plz let me know my mail id is bjr@aol.in its very
urjent