08-25-2010, 04:51 PM
Hi,
I am trying to change the datatable path of my QTP scripts by using excel macro code as follows,
When it invokes the last line, QTP will be closed automatically.
Please let me know is it possible to change the datatable sheetname in QTP scripts through the object "QuickTest.Application" if so please guide me how to do the same.
Note: As I need to change the datatable inputsheet name for N number of QTP scripts so I thought of automating this work through excel macro instead of opening every scripts manually and change its inputsheet path
I am trying to change the datatable path of my QTP scripts by using excel macro code as follows,
Code:
Set App = CreateObject("QuickTest.Application")
App.Open "C:\Documents and Settings\Desktop\sample1"'opening my QTP script
Set qtTestResources = App.test.Settings.Resources'creating a object to access resource tab(file->setting->resources tab)
New_Loc = "C:\Documents and Settings\Desktop\inputdata.xls"
qtTestResources.DataTablePath = "C:\Documents and Settings\Desktop\inputdata.xls"
When it invokes the last line, QTP will be closed automatically.
Please let me know is it possible to change the datatable sheetname in QTP scripts through the object "QuickTest.Application" if so please guide me how to do the same.
Note: As I need to change the datatable inputsheet name for N number of QTP scripts so I thought of automating this work through excel macro instead of opening every scripts manually and change its inputsheet path