Forum Discussion
AlexeyK
Alumni
14 years ago
your solution looks like it will work if all of the test code (as far as manipulating the objects go) are in one script under the script tree. What if I had one script for each tab? How can I move back and forth there? I haven't researched it yet, I just thought of that as I was typing this response.
My "pseudo-code" was not clear enough, sorry :-). Of course, you can create individual script routines to work with each of your tabs and call these routines from your "main" test. Moreover, I'd even recommend that you do this as in this case, the test logic will be clearer, and it will be easier to maintain tests. You can also organize your script routines in several units for easier management.
As you will use DDT drivers in different script routines, you can use global script variables to store the driver objects. The entire script structure can look like this:
// Define global variables
var Driver1, Driver2, ... Driver6;
// Initialize drivers
function InitDrivers()
{
...
}
// Simulate user actions on tabs
function TestTab1()
{
...
}
function TestTab2()
{
...
}
// Perform finalization actions
function Finalize()
{
}
function Main()
{
InitDrivers();
while (!Driver1.EOF() && !Driver2.EOF() ...)
{
TestTab1();
TestTab2();
...
Driver1.Next();
Driver2.Next();
..
}
Finalize();
}