How to use library files in QTP? how we can call these
files in to script?
Answer Posted / 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 |
Post New Answer View All Answers
How to export quicktest professional (qtp) results to an .xls file?
How to use reporter.report event in qtp ?
Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers
How to handle the exceptions using the recovery scenario manager in qtp?
• What type of testing questions will be asked for 2+ yrs exp people in interview?
how to evalute defects in QTP script?
How to replay a script in qtp?
What are the methods of the TextStream object that are used for reading from a text file?
What are the advantages of qtp?
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
What are the challenges you faced during you entire life automation ?
How smart identification works in qtp ?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
How we can import data from database?
Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this