This is helpful incase you need only particular set of function libraries based on the environment of AUT.
For example:- we are doing localization testing of our AUT, so instead of associating all the function libraries to the test, we’ll use only required set of libraries based on localization of AUT and that will be added at the run time.
LoadFunctionLibrary (Path of the function library)
‘Loading function libaries based on the localization of AUT
‘Tkaing value of AUT Enviornment from Datatable or external database
‘Based on the enviornment concerned library will be laoded at runtime
If sLocal=“Dutch” Then
- As we are adding this at Runtime, so it wont be visible in Resources,Missing Resources,To do panes
- Performance of UFT can be affected as Function libraries are getting loaded at Runtime
- At the end of Run, all the dynamically loaded libraries are unloaded.
- Incase function Name is same inthe associated and dynmically loaded libray than Dynamically loaded function will be given preference
- Another way of loading libraries at runtime is using “ExecuteFile” statement in vbscript.
- ExecuteFile “C:Functions.vbs” (Now all the functions inside this file are available for usage in the script)