How do we call Library Files(.vbs) in the Test Script

Thanks in Advance...


Answer Posted / sreekanth chilam

Calling of Library Files can be done in two ways:

1.Loading(Calling)the Library Files in design Time:
In QTP 8.2
Test Menu --> Settings--> resources tab --> click "+"
Button & browse the required file & click Apply.
Now the library file has been associted with entire
(Current)test.(This entire process is done before run time
i.e during design time ).

so all the Actions contained in the test can access the
functions written in the .vbs files.


2.Loading the Library Files during the Run Time:

By using th ExecuteFile Statement.

Syntax:ExecuteFile "../.../../../.vbs filepath"

Here in which action the above statement is given ..in to
that action only the .vbs file will be loaded/called.. but
not to all actions contained in the Test.

During Run time , executefile statement loads .vbs file
into the current action of the test.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to handle dynamic objects in quicktest professional (qtp)?

550


what is ODC and GDC?

7355


Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji

2270


What is difference in global and action sheet in qtp?

616


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

2877






UFT 12.02 which ALM version will support

985


How to find operating system information using the qtp script?

587


Hi, Can we open a test in qtp10 which is saved in qtp 9.2?

1440


Does QTP run in any environment?

616


X flies from Hyd to bangalore using different methods of transportation. write the test scenarios and test cases for this?

1509


Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek

1571


How you are developing the script? Using record and play back or manual?

633


What r the different filters in defect in quality center

3287


Can U Explain about QTP tool from older version to latest version also its differences?

1521


How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If

2577