Thursday, June 4, 2009

Adding a Parameter to RunTime DataTable in QTP

The following example uses the GetSheet method to return the "MySheet" sheet of the run-time Data Table in order to add a parameter to it.
MyParam=DataTable.GetSheet ("MySheet").AddParameter("Time", "8:00")
You can also use this to add a parameter to the "MySheet" local sheet (note that no value is returned).
DataTable.GetSheet ("MySheet").AddParameter "Time", "8:00"
myparam = DataTable. LocalSheet.AddParameter("Time", "5.45")
MsgBox myparam 'output is 5.45

No comments:

Post a Comment