@Raj - Shoudnt this be do able? [img]/images/graemlins/frown.gif[/img]
I thot GetRef is essentially used so that we dont have to put the function definition within each action and access the same across actions
Can you provide some example where we can use GetRef?
I found below reference in QTP Help file:
Returns a reference to a procedure that can be bound to an event.
Set object.eventname = GetRef(procname)
The GetRef function allows you to connect a VBScript procedure (Function or Sub) to any available event on your DHTML (Dynamic HTML) pages. The DHTML object model provides information about what events are available for its various objects.
I tried the above code in different actions. But reference to functions are not visible in Action2.
I am not sure if there is a way around to make function pointers global to be accessible across actions something like this
ExecuteGlobal Set fnPtr = GetRef("CommonFunction")
and access the reference to call function in Action2 which is defined in Action1