How do we call Library Files(.vbs) in the Test Script
Thanks in Advance...
Answers were Sorted based on User's Feedback
Answer / raj
We can use ExecuteFile statement to call vbs files.
Syntax : ExecuteFile <filepath>
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sreekanth chilam
Calling of Library Files can be done in two ways:
1.Loading(Calling)the Library Files in design Time:
In QTP 8.2
Test Menu --> Settings--> resources tab --> click "+"
Button & browse the required file & click Apply.
Now the library file has been associted with entire
(Current)test.(This entire process is done before run time
i.e during design time ).
so all the Actions contained in the test can access the
functions written in the .vbs files.
2.Loading the Library Files during the Run Time:
By using th ExecuteFile Statement.
Syntax:ExecuteFile "../.../../../.vbs filepath"
Here in which action the above statement is given ..in to
that action only the .vbs file will be loaded/called.. but
not to all actions contained in the Test.
During Run time , executefile statement loads .vbs file
into the current action of the test.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ram.polavarapu
we need to associate file to qtp and
call function name
executefile "path.vbs"
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / k.sai krishn reddy
u can add library file to ur script through Test-----------
-->Resources tab here u find option called add file there u
can add ur files manually before running the script then
save it so when ever u open that script attached lib files
also opened with that script.
i hope this will satisfy.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / uday
Associating a function library can be done in many ways.
Putting all the above valid answers here.
1. Open QTP -> Click on File menu -> Settings -> Resource ->
Choose the file path of the function library.
(Manual way of associating a function library)
2. ExecuteFile "FilePath".
If you use in an action, then the functions in function
library are available on that action only, other actions
cannot access the functions in function library.
Another disadvantage is, the function pointer will not go
into the function library when you debug the script.
3. LoadFunctionLibrary(From QTP 11), which will load the
function library at run-time.
4. Using AOM.
Thanks,
Uday
http://qtpftvideos.blogspot.com/
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the difference btn risks & Therads in the Test plan documentation?
1)what is the quality process in QTP? 2)how to add the .tsr file in qtp through scripting?
how can i parameterize a login page by using database parameterization i fetch the username and password from database and put this on login page and click on ok button. so how can we write script for that code please let me know asap thanks
hi.what is exactly mean by real time frame work? every institute teach Framework is nothing but having 6 to 7 folders..and save repositories functions keywords and scripts? this is enough or not? can we beleive?
does automation replace manual testing?
What are they Advantages and Disadvantages in QTP 9.2?
What is an object repository?
In smart identification, explain about 1. Base filter properties 2. optional filter properties with examples?
can we create recorset with out using database connection in vbscript?
Could anyone help me for the below scenario: i am using the descriptive programming for my account, in which we have to generate the contract in the MS-word. when i generate this doc, we need to click on enable macros to continue further. but i am unable to make qtp to click on this. if anybody faced the problem like this??? pls help to get it resolved? Thanks in advance
Can we test GUI of the application using QTP.? How.?If possible briefly explain process.?
if you have the same application screen with 7 drop down boxes and approximately 70 values how do you test with QTP?