Thursday 14 March 2013

How to Associate Function Library in QTP

Well - we can associate function library to QTP Test either manually or by automation code.


  • Manually with Test Settings - In this method you have to go to Test Settings->Resources and add any library file. library File can have 3 extentions - .vbs, .qfl or .txt
  • By Automation Code, You have to use below code.

    Set App = CreateObject("QuickTest.Application")
    If App.Launched Then ' If QuickTest is  open
            App.Quit
    End If
    App.Launch
    App.Visible = True
    App.Open Testpath
   
    Set qtplib = App.Test.Settings.Resources.Libraries
   
    qtplib.RemoveAll   
    qtplib.add "c:\lib1.vbs"
    App.Test.Save


This code will associate lib1.vbs file with test viz. Testpath



No comments:

Post a Comment

Please Leave your reply. We value your feedback and inputs

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.