Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to call function lib at run time from an action
#1
Not Solved
Maybe silly, but i have developed an automation framework where in i
need to call a Demo.qfl (runtime) from an ACTION. If i use the
following funcLibraryFile() , it fails to call since QTP doesnt know
which lib to check this function since qfl is not loaded atall. I can
not use Absolute file path.

Call funcLibraryFile("Demo.qfl")

My Sub is and i am using executeFile
Code:
sub funcLibraryFile(libFile)

       Set fso=CreateObject("Scripting.FileSystemObject")
       strTestPath=Environment.Value("TestDir")

       strBinPath=fso.GetAbsolutePathName(strTestPath & "..\\..\\..\\..\
\lib")
       strFileName=fso.BuildPath(strBinPath,libFile)

       If fso.FileExists(strFileName) Then
               executeFile(strFileName)
       else
               errNum=err.number
       End If

       Set fso=Nothing
end sub

Any ideas?

thanks-anil
Reply


Messages In This Thread
How to call function lib at run time from an action - by anilyad - 09-01-2010, 09:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Object not found during the 2nd iteration of an Action call in a For loop BGunay 0 969 04-23-2020, 07:08 PM
Last Post: BGunay
  QTP not recogonising object during run time Lavanya N 2 3,723 10-28-2015, 12:46 PM
Last Post: vinod123
  Writing to Run time data table Neetha 5 12,163 08-27-2015, 10:18 AM
Last Post: supputuri
  Calling a function in a Test Script from a function library anupam4j 3 6,114 06-26-2015, 12:31 AM
Last Post: babu123
  Not able to call the function kathirvelnagaraj 1 2,603 01-06-2015, 07:24 PM
Last Post: kathirvelnagaraj

Forum Jump:


Users browsing this thread: 1 Guest(s)