Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reusable function.
#2
Solved: 11 Years, 4 Months ago
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:

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)
Reply


Messages In This Thread
Reusable function. - by webapp - 01-24-2008, 10:21 PM
RE: Reusable function. - by idolast - 01-25-2008, 07:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a function in a Test Script from a function library anupam4j 3 6,127 06-26-2015, 12:31 AM
Last Post: babu123
  Non-reusable action - doubt srsaritha 1 3,510 10-16-2012, 05:04 PM
Last Post: richa07
  how to call reusable actions by passing parameters.? Arun091 0 3,881 08-16-2012, 07:28 PM
Last Post: Arun091
  Is there any mapping between script and reusable action. TurtleRock 2 3,173 12-20-2011, 09:56 AM
Last Post: Sathiya
  Doubt in non reusable actions pradeep singh 6 9,188 11-19-2011, 12:19 AM
Last Post: srsaritha

Forum Jump:


Users browsing this thread: 1 Guest(s)