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 |
which tpye of exceptions mostly do we face in QTP
i want 8.2 and 9.2 dacuments plhelp any body sand it to my id sandhyat1@yahoo.co.in
How many types of parameters are available in quicktest professional (qtp)?
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?
Discuss quicktest professional (qtp) environment?
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.
What is keyword driven framework?
What is object repository?
can the activities of test case design be automated?
What are the different scripting languages you could use when working with QTP ?
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
Syntax for how to call one script from another and Syntax to call one "Action" in another?