Micro Focus QTP (UFT) Forums
QTP:Issue related to use a global function - 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: QTP:Issue related to use a global function (/Thread-QTP-Issue-related-to-use-a-global-function)



QTP:Issue related to use a global function - galstar - 08-06-2010

Hi,

I am facing some issues while automating my web application.

1. I have a function for random string creation .And want to use it in lots of scripts around 10.So i want to make it Global so that i'll just call the function and it'll be usable there.For this please suggest me how to do this..

2. I have made a 'log in' action in one script .And same login action is required in all scripts so i made it reusable in that script.Now i called the reusable action to other scripts too.But parent property mismatch error is getting populated for that action in other scripts.Donn know whySad?

Please help me to sort it out....

Thanks


RE: QTP:Issue related to use a global function - venkatbatchu - 08-06-2010

Use either Environment variable why because u were using reusable actions
or
Create a gobal variable in a function and call this function at required places

U could add this function either in function library or dynamically load using "Load"

Venkat.Batchu


RE: QTP:Issue related to use a global function - galstar - 08-06-2010

Yeah..Its workin..ThanksSmile