how can we call an external library file in QTP apart from
using the Executefile statement..?? is there any other way
we can call the external library file in QTP..??

Answers were Sorted based on User's Feedback



how can we call an external library file in QTP apart from using the Executefile statement..?? is ..

Answer / nath t

Yes we can associate the library files with out
using "Executefile" statement. But you should use AOM method

Example:
Dim qApp
Dim qLibs

Set qApp = CreateObject("QuickTest.Application")
qApp.Launch
qApp.Visible = True

qApp.Open "E:\Test1", False, False ' Open a test

Set qLibs = qtApp.Test.Settings.Resources.Libraries ' Get
the libraries collection object
qLibs.Add "C:\Utilities.vbs", 1 ' Add the library to the
collection

qApp.Test.Save
qApp.Quit
Set qLibs = Nothing
Set qApp = Nothing

First of all you have to create Quick Test object after
that open the test with the help of Quick Test Object and
also create Libraries object after that you can add ".vbs"
files.

Is This Answer Correct ?    5 Yes 3 No

how can we call an external library file in QTP apart from using the Executefile statement..?? is ..

Answer / mogal

LoadFunctionLibrary "LibraryNameWithPath"

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

what r the drawbacks and limitations of QTP?

2 Answers   NIIT,


what is descriptive.create()in qtp?

4 Answers   IBM,


Hi This is tanya actually im facing problem in Qtp actully some time QTP doesnot recoznise the recorded object due to which script is going to fail.so can you tell me how we can handle this situation and i have another concerened issue is that at the time of run New errors comes every time so how we can handle this sitauation how we can add Recovery scenarios to the script.some time application runs successfully and some time it produces new error thats why i am facing lot of problem please give me the sugeestion as soon as possible.

2 Answers  


What is the difference between Recover Scenario(screen) and on Error Resume Next(code)

4 Answers  


does test plan is in test strategy or test strategy is in test plan

2 Answers   Tanla Solutions,


can any body tell me all of the release dates of QTP?????..... thanks in adv!

3 Answers  


how to get the object count ?????????

8 Answers  


What is smart identification in QTP?

0 Answers   HCL,


hi i have one doubt i have 4 yrs exp in testing and iam working one mnc in north but i have completed my degree correspodene is the companies are accept in south side some people are tellig they won't agree but i need correct answer plz let me know which companies are taking and not taking thanks in advance

8 Answers  


Can i get a simple example exercise for update run mode for sample flight application......... In qtp when i try to run the test in update mode.. Auotmation> update option is disabled............ Pls let me know ................. Thanks in advance.....

3 Answers  


what is web application and client server application.is there any difference ?

1 Answers   Wells Fargo,


Hi, Can any body please tell me how to create framework in qtp & where i can get some material to learn about it. regards, rahulT

1 Answers  


Categories