Create Function Library in UFT

Q

How to create Function Library in UFT?

✍: FYIcenter.com

A

A UFT function library is just a VBScript source code file containing user defined functions.

You can create function library using any text editor and save it as (.vbs) file.

Function library allows you to put VBScript functions that are needed for multiple tests to be centralized in a single file. For example, you can create a function library called: library.vbs with these functions:

Function CopyFile(SrcDir, DestDir, FileName)
... 
End Function

Function DBConnect(byRef Session, ConnString)
...    
End Function

Then this function library file "library.vbs" can be loaded in any tests which need to use these functions.

 

Load Function Library in UFT Test

Load UFT Environment Variable File

Developing Test Script Code

⇑⇑ UFT (Unified Functional Testing) Tutorials

2018-01-24, 153👍, 0💬