Micro Focus QTP (UFT) Forums
How to make function common for all action - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to make function common for all action (/Thread-How-to-make-function-common-for-all-action)



How to make function common for all action - riteshgpt - 04-28-2010

I have function written in one action.
Now i want to call from another action.

How to make common function repositery, so that i can call from any action?

At this moment I made pucblic function and i am able to call only inside that action.
so please let me know how i can call from other action?

how I can associate function from other action?

Call FunctioA
Call Functiob

Public Function FunctioA
'to do task A
End Function
Public Function FunctioB
'to do task B
End Function
Thanks in Advance


RE: How to make function common for all action - sreekanth chilam - 04-28-2010

Hi Ritesh,

Follow the below procedure:

step1. Open a Notepad & copy the function defination(ex: Function A code) into it and save as test.vbs file

step2. Load the above test.vbs file into Test > Settings > Resources > click "+" button > add test.vbs file > Apply > OK

step3. Call the above function in any of the actions.


RE: How to make function common for all action - riteshgpt - 04-29-2010

Thanks for response