How to use library files in QTP? how we can call these
files in to script?

Answers were Sorted based on User's Feedback



How to use library files in QTP? how we can call these files in to script?..

Answer / uday kumar_anem

We can load the external Library files by using 2 ways:
1. Choose Test > Settings > Choose Resources tab >
Choose + button so select the library file > browse and
select the library file > click Ok.

2. We can load the library files using Scripting:
Use executefile function to load library files.
Example:
executefile "C:\Documents and
Settings\ukumar\Desktop\Sample.vbs"
x=10
y=5
result=SumOfTwoNumbers(x,y)
msgbox(result)


'Code in External Library file(.vbs file).
'Public function SumOfTwoNumbers(a,b)
'Dim sum
'sum=a+b
'SumOfTwoNumbers=sum
'End Function

Is This Answer Correct ?    11 Yes 1 No

How to use library files in QTP? how we can call these files in to script?..

Answer / priyank

add it to resource OR if you required during run-time use
ExecuteFile " ..\absolute path "

Is This Answer Correct ?    3 Yes 1 No

How to use library files in QTP? how we can call these files in to script?..

Answer / chandana

Hi priyank

can u plz explain in detail with validations, it is very
use full for us.

Thank U

Is This Answer Correct ?    2 Yes 0 No

How to use library files in QTP? how we can call these files in to script?..

Answer / pravati

file>>new test>>test name>>test path >> save
file>>new>>function library>>path>>create file>> write script>>save.
for associate file>>setting>>Resources>>associate function library in the test which u want to call the function library>>apply>>ok

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

What is quicktest professional (qtp window?

0 Answers  


how to get the particular chr in an array list the question is ....i have an array like this ABCD EBCF GBCH IBCJ HERE I NET TO GET ONLY "BC" FROM ALL HOW TO GET IT HELP ME ANY ONE THANKS

6 Answers   Cap Gemini,


Explain the check points in QTP?

22 Answers   Gray Matrix, IBM, Microsoft, Prapan Solutions, Zensar,


How to capture text from image to word

2 Answers  


how to call multiple scripts in QTP at a time

3 Answers   IBM,






I have 1 to 10 action are there, i want action1 output becomes to action 10 input? pls any can give script for this scenario?

5 Answers   AZTEC,


In QTP how can we recognize objects Without using Object Repository?

3 Answers   IBM, Wipro,


What are the benefits of qtp?

0 Answers  


How i can change shared repository to per test repository in qtp

1 Answers  


How does you pass optional arguments in qtp?

0 Answers  


Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?

1 Answers  


Hi, My application is a web application which was developed by Java. In that application we have applets to do some operations. Is it possible to recognize applets using QTP? If yes, how? pls, help me this

1 Answers  


Categories