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

which tpye of exceptions mostly do we face in QTP

2 Answers  


i want 8.2 and 9.2 dacuments plhelp any body sand it to my id sandhyat1@yahoo.co.in

3 Answers   Siloka,


How many types of parameters are available in quicktest professional (qtp)?

0 Answers  


How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?

2 Answers  


Discuss quicktest professional (qtp) environment?

0 Answers  






How vl i prioritize the actions when i have 10 actions A1, A2, A3......A10. I want to run action as follows A1,A5,A6 and A10. How i can do it. Thanks in Advance to u.

7 Answers   IBM, Wipro,


What is keyword driven framework?

0 Answers  


What is object repository?

3 Answers  


can the activities of test case design be automated?

0 Answers  


What are the different scripting languages you could use when working with QTP ?

6 Answers  


Why we have to import data from excel sheet to data table?becoz v can directly use test data directly from xl know. can u all pls explain me clearly

1 Answers  


Syntax for how to call one script from another and Syntax to call one "Action" in another?

1 Answers   Crea,


Categories