Forum Discussion
stref
15 years agoOccasional Contributor
It can be done. You have access to the test items from Script like this:
var testcaption = Project.TestItems.TestItem(0).ElementToBeRun.Caption;
The test item caption will look something like "Script\Unit1 - Dlg"
That tells you it's a script, the unit name and function name to execute. From there you could use the eval method (JScript) and call the function after parsing out the name:
eval(ParseElementToBeRun(testcaption));
Of course, ParseElementToBeRun is left as an exercise for the reader. :)
Good luck,
-Steve
Get Trained! http://www.automatedqa.com/support/training/