How to use library files in QTP? how we can call these
files in to script?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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
Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?
Explain getroproperty and gettoproperty & settoproperty?
how to write the descriptive programming in QTP for loginwindow.without using Step generator,object repository for referecnes
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
How can we automate Capthca on registration or any contest forms ? Is it possile to Automate Webpages with Falsh using QTP..?
How to add check point?
What is the quicktest professional (qtp) testing process?
Which object repository we use in real time and can we merge 2 object repostiory and how?
Test Life cycle starts IS it Requirments stage or Test Initiation?
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?
How to handle Dynamic Arrays?