Hi Shalabh, I think ExecuteFile method belongs to QTP not belongs to VBScript. If you are going to use it in .vbs file it may give you error. There is a scenario you can use it but that .vbs file should be associated to resources. Then you can use.
As per your code snippet...you have already used qtpApp.Test.Settings.Resources.Libraries.Add(lib_Path_of_RootFolder & lib_Path_of_StartFramework_Library) So library files will be added to the resources automatically... you can call the function in the script....If there is any mistake in my explanation let me know i will correct it. - Thank you Santhoshg On Tue, Sep 13, 2011 at 4:07 PM, Shalabh Dixit <[email protected]>wrote: > Guys, > > I want to run the functions inside my function library using QuickTest > Application object. As we all know the method to load and run the > function library at runtime is "ExecuteFile". I want to run thi method > using quicktest object and then want to call the functions inside my > function library. > > Below is the half-way code for my framework-launcher script: > -======================================================== > 'Create the Application object > Set qtpApp = CreateObject("QuickTest.Application") > '------------------------------------------------- > 'WScript.Echo "" > WScript.Echo "Invoking QTP..." > WScript.Echo "Done" > '------------------------------------------------- > 'Start QuickTest > qtpApp.Launch > 'Make the QuickTest Application visible > qtpApp.Visible = True > 'Maximizing the QuickTest Application Window > qtpApp.WindowState = "Maximized" > '------------------------------------------------- > 'Open Framework > qtpApp.Test.Environment.LoadFromFile("C:\Shalabh\Automation Framework > \Config\Function_Libs.xml") > lib_Path_of_RootFolder = qtpApp.Test.Environment("lib_RootFolderPath") > lib_Path_of_VBScript_Library = > qtpApp.Test.Environment("lib_Util_VBScript") > lib_Path_of_StartFramework_Library = > qtpApp.Test.Environment("lib_Util_StartFramework") > qtpApp.Test.Settings.Resources.Libraries.RemoveAll > qtpApp.Test.Settings.Resources.Libraries.Add(lib_Path_of_RootFolder & > lib_Path_of_StartFramework_Library) > ExecuteFile lib_Path_of_RootFolder & > lib_Path_of_StartFramework_Library > -======================================================== > > Now I want to call the function "StartFramework" which is inside > "lib_Util_StartFramework" library. > > Request you all to provide their valuable inputs on the same. > > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en -- Thanks and Reagards Santhosh G +918007850250 -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
