A library is nothing but a file which contains function
procedures and sub procedures. These library files can be associated to any
script in QTP or UFT,so that the script in QTP/UFT can call or reuse the
procedures present in the library file.
Library files can have 3 extensions as below:
>.txt
>.vbs
>.qfl
|
Creating Library file with extension .txt
-----------------------------------------------
1.Open Notepad.
2.Paste existing procedures or create new procedures.
3.Click Save.From the file dialog opened give any
name(lets Say lib) and click OK.
4.Library file is ready with extension .txt.
Creating Library file with extension .vbs
----------------------------------------------
1.Open Notepad.
2.Paste existing procedures or create new procedures.
3.Click Save.From the file dialog opened give any
name(lets Say lib) and click OK.
Note:you must provide the double quotes
around file name Ex-:"lib.vbs"
4.Library file is ready with extension .vbs.
Creating Library file with extension .qfl
---------------------------------------------
1.from QTP Select File>New>Function Library.Opens a
new function library to write functions.
2.Place procedures in the function library script editor.
3.Click Save icon.From Dialog opened enter your file name
like lib.qfl and Click OK.
4.Library file is ready with extension .qfl
Associating/Adding Libraries to QTP/UFT
-------------------------------------------
1.Select File>Setting.Test Setting Dialog will open.
2.Click + to add a library file.A file browse button
will be displayed and select the file.
3.Automatic Relative Path conversion dialog appears.Select
Yes to close this dialog and Click OK to close the Test
Setting Dialog.
4.Click Check Syntax button to validate the syntax of
functions in the library file.
|
Monday, 3 August 2015
Creating Library File in UFT/QTP
Subscribe to:
Posts (Atom)