In this article, we will learn different ways to load function library at runtime in UFT.I hope you might already know how to create a function library and associates with a Test in UFT. If you don’t know, you can refer to my post Create User-Defined Functions in UFT. If you are working on a large-scale automation project and dealing with a complex automation framework, you might feel the need to associate some of the function libraries at runtime in UFT.
So lets get started!
What You Will Learn?
- 1 Ways to Load Function Library in UFT
- 2 Conclusion
- 3 Recommended Posts
Ways to Load Function Library in UFT
The following are the different methods to load function library at runtime in UFT.
Load Function Library at runtime in UFT Using ExecuteFile Method
ExecuteFile file statement runs all codes in the specified function library thus making all functions and subroutines in the file available for use.
ExecuteFile Function Library File Path
Load Function Library at runtime in UFT Using LoadFunctionLibrary Method
UFT 11 onwards HPE introduced LoadFunctionLibrary method to load function library at runtime. It also runs all code in the specified function library thus making all functions and subroutines in the file available for use. However, there are few differences between both ExecuteFile and LoadFunctionLibrary methods.I will discuss that at later part of this tutorial.
LoadFunctionLibrary <Function Library File Path>
ExecuteFile VS LoadFunctionLibrary in UFT
Make the Scope of Functions Global, Loaded through ExecuteFile
In this article we learned how learned two diffrent ways for loading function library at runtime.Hope you have liked this post.Please don’t forget to share it and if you have any questions please do mention that in the comment box.
- How to Use LoadAndRunAction in UFT
- How to Debug a Test in UFT
- How To Get Tooltip Text In UFT
- How to Use Call Stack in UFT to Trace Function Calls with Example
- Understanding Object Spy in UFT
- How to Use RegisterUserFunc in UFT with Examples
- An Insight on UFT Test Settings
- The Ultimate Cheat Sheet on Step Generator in UFT
- How To Add Page Checkpoint in UFT