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 can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)
What are the views available in quicktest professional (qtp)?
What are the types of environment variables in qtp?
Hi All, How to get repeated word in string . Thanks Balaji
What is the difference between QTP and WinRunner? Why do you choose only QTP for automation among remaing tools like Rational robot and silk test? Write the VBscript for any functionality in your project ? What is the cost of QTP ? If you entered into yahoo mail with your valid user name then you will get FOR EXAMPLE , " welcome to krishna " on the top of inbo page , how can you test it in QTP? What type of testing you can do, when we gave you 5 screens and how can you test that application? What type of framework you are using in your company and explain it?
If you are testing a web application then what will you test in that application?
Explain the N-tire structure(process) for Funds Transfer ( means give N ways to funds Transfer in an Application)
Explain types of output values?
What are the properties you would use for identifying a browser and page when using descriptive programming?
Generic function to search for the unique link in webtable and click on it
What if recovery scenarios is also failed for identify the alert ? (We are handling unexpected popup through recovery scenarios but if still recovery scenarios also failed than what should be the approach)
can any body give the banking domain concepts/links
What is the pros and cons between QTP and Rational Robot
In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?
1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.