Can we add the function library directly from scripting in
qtp instead of adding from resource tab?

Answers were Sorted based on User's Feedback



Can we add the function library directly from scripting in qtp instead of adding from resource tab..

Answer / nath .t

Sorry for the small mistake in the above answer.



Set qtApp = CreateObject("QuickTest.Application")

qtApp.Launch

qtApp.Visible = True

qtApp.Open "C:\Tests\Test1", False, False

qtApp.Test.Settings.Resources.Libraries.Add "e:\Utils.vbs"

Is This Answer Correct ?    8 Yes 2 No

Can we add the function library directly from scripting in qtp instead of adding from resource tab..

Answer / nath .t

through script we can do

executefile "give the path"
Ex: executefile "d:\functionlibrary.vbs"

another way we can add to our script is AOM(Automated
object model)

first of all create Quick Test object than we can add with
that object.

Ex:
qtApp.Test.Settings.Resources.Add "Path of the library file"

like this we can add.

Is This Answer Correct ?    5 Yes 1 No

Can we add the function library directly from scripting in qtp instead of adding from resource tab..

Answer / pikkilimadhu

Executefile "filepath.qfl" (we can do with qfl,vbs,txt extensions in this method)

loadfunctionlibrary "filepath.qfl" (we can do only qfl extension in this method)

Is This Answer Correct ?    0 Yes 0 No

Can we add the function library directly from scripting in qtp instead of adding from resource tab..

Answer / mohit

Naren,
Seems like u need to learn that adding a library and executing a library are two different tasks. In a laymen language, (that u seems to b more suitable for u) the difference is exactly what is in between loading a gun with bullets and firing the bullets. If u add something to ur resources, u may or may not use it in future. But when u execute something.. u command the control to execute it then and there without knowing even it is needed or not. So come prepared next time when u post something. Gud Day!

Is This Answer Correct ?    0 Yes 3 No

Can we add the function library directly from scripting in qtp instead of adding from resource tab..

Answer / naren

Hi Nath,

Please understand the questions first no hurry. Execute File
is the correct answer then again what is the need for adding
OR through scripting. Function Library means user defined
function(x.vbs) so Execute file is enough. The question does
not ask about adding Object Repository through scripting.

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More QTP Interview Questions

How QTP integrate with application?

1 Answers  


What is the use of Debug Viewer?

0 Answers  


if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

6 Answers   Logica CMG,


Have you faced any problems with object repository?

0 Answers  


How can we upload pdf files in qtp?

1 Answers   Syntel, TCS,






what is actually contain test report? can anybody post the test report

0 Answers   Synechron,


Is it possible to convert QTP scripts to Silk scripts?

2 Answers   Sierra Atlantica,


Hello Everybody, Please tell me can we create Test Plan in QTP? This I am asking irrespective to integrating with Test Director.I mean is there any option to create Test Plan in QTP itself. Thanks, Gaytri

4 Answers  


How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)

5 Answers  


How to create Reusable and Multiple Actions?

0 Answers  


what is debugging testing?

5 Answers  


How can i open 5 multiple browser at once through QTP VB script and i want to login with 5 different credentials i already tried with this code but its entering credentials only for first browser and am using datatable to parameterize

2 Answers  


Categories