How do we call Library Files(.vbs) in the Test Script

Thanks in Advance...


Answers were Sorted based on User's Feedback



How do we call Library Files(.vbs) in the Test Script Thanks in Advance... ..

Answer / raj

We can use ExecuteFile statement to call vbs files.

Syntax : ExecuteFile <filepath>

Is This Answer Correct ?    1 Yes 0 No

How do we call Library Files(.vbs) in the Test Script Thanks in Advance... ..

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

How do we call Library Files(.vbs) in the Test Script Thanks in Advance... ..

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

How do we call Library Files(.vbs) in the Test Script Thanks in Advance... ..

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

How do we call Library Files(.vbs) in the Test Script Thanks in Advance... ..

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

How do we call Library Files(.vbs) in the Test Script Thanks in Advance... ..

Answer / sri satya

By using script, we can add in this way also:

path1="C:/Lib1"
path2="C:/Lib2"
Set qtLibraries =
qtApp1.Test.Settings.Resources.Libraries ' Get the
libraries collection object

qtLibraries.Add path1 ,1
qtLibraries.Add path2 ,2

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

Cn u please clarify my doubt Where are micTab and micReturn used.Thanx in Advance

2 Answers  


hi i have one issue while automating the script using QTP i want scrool down .i cannot do even using scrool down methqad is not working .the object will take WebElement plz is there any code help me

3 Answers  


How to convert manual test cases to automated testcases

1 Answers   TCS,


Is it possible to convert QTP scripts to Silk scripts?

2 Answers   Sierra Atlantica,


i have qtp 9.5 ver software.but i don't know the license key. if anyone have license key please send it to my personal mail id(munir.reddy@yahoo.com

2 Answers  






Syntax for how to call one script from another? and Syntax to call one "Action" in another?

2 Answers  


Explain calling sub procedure.

0 Answers  


Explain how qtp identifies object?

0 Answers  


CAN I CALL A FUNCTION IN ACTION.IF YES PLEASE HELP ME

2 Answers   TCS,


What is the use of Testing framework in Automated testing..what are different kinds of Testing frameworks available in Automated testing...

1 Answers   IBM,


How to run a test using quicktest professional?

0 Answers  


1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible

0 Answers  


Categories