01-25-2008, 07:18 PM
You could use "Insert->Call to Existing Action" to insert the existing Action. This is only possible if the action is declared as reusable.
But be careful: The DataTable-Sheets of the external Action and all its sub-actions will get a new name, when integrated into another test. This new name is: "Actionname [Testname]".
So if your action accesses any of the DataTable-Sheets directly using their names, you have to keep this in mind.
In order to overcome this problem you can access your datatable-sheets like this:
But be careful: The DataTable-Sheets of the external Action and all its sub-actions will get a new name, when integrated into another test. This new name is: "Actionname [Testname]".
So if your action accesses any of the DataTable-Sheets directly using their names, you have to keep this in mind.
In order to overcome this problem you can access your datatable-sheets like this:
Code:
Set myRegExp = new RegExp
myRegExp.Global = false
myRegExp.Pattern = "NameOfThisAction"
sheetSuffix = myRegExp.Replace(DataTable.LocalSheet.Name, "")
Now the access to the sheet:
testValue = DataTable("myColumn", "TheAction" & sheetSuffix)