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

How 2check the color of the text in the textfield . say suppose the text entered in the textfield object is appearing in red. so i want to check whether the text is in red color or not. It could be great help for me if any one solve's my issue. plz...help

5 Answers   Sinertel,


Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?

1 Answers   Crea,


Explain getroproperty and gettoproperty & settoproperty?

1 Answers  


how to write the descriptive programming in QTP for loginwindow.without using Step generator,object repository for referecnes

4 Answers   STC,


Hello everybody, can we maintain the state of page in QTP? 1. suppose i opened a notepad text file i entered some text and changed the font type and font size and saved that file. 2. Now next time when i will open a new notepad file it is showing me that font type and size which i changed in my previous step. 3. Here i want that QTP should capture the default setting i.e. it should maintain the state of the page. Thanks in advance, Gaytri

0 Answers  






How can we automate Capthca on registration or any contest forms ? Is it possile to Automate Webpages with Falsh using QTP..?

1 Answers  


How to add check point?

2 Answers  


What is the quicktest professional (qtp) testing process?

0 Answers  


Which object repository we use in real time and can we merge 2 object repostiory and how?

3 Answers  


Test Life cycle starts IS it Requirments stage or Test Initiation?

1 Answers  


Scenario:2 combo boxes.1st combo contains a,b,c,d.2nd combo contains 10..20,20..30,30..40,.Selecting 'a' shld display 10...20,'b' shld display 20..30.. and so on.tell d script? 2.Random testing of 500 test cases in qtp?

1 Answers  


How to handle Dynamic Arrays?

0 Answers   Wipro,


Categories