Forum Discussion
ilija_panov
13 years agoContributor
Thanks Alex,
I'm making some progress with the OnStartTest event, it seems to be evoked in the recursive funciton, but i still don't know whether to use = or some other function with the object variable type for assigning it to local variables in tests.
For example, the event looks like
//USEUNIT database
function GeneralEvents_OnStartTest(Sender)
{
var accounts = database.getAccounts(Project.Variables.user);
Project.Variables.accounts = accounts;
if (Project.Variables.accounts != null)
{
Log.Message('accouts filled');
}
}
and the simple checks confirms that the Project.Variables.accounts is not null
but whenm i try to use the accounts object type global variables in tests
....
var accounts = Project.Variables.accounts;
var i;
for (var num_cue_s in logon.accounts)
{
panel2.panel.form.panelTablerowBackgroundlightgray.panelRightcolumn.selectAccountsdropdownlist.ClickItem(accounts[num_cue_s]);
i++;
if (i > 1) break;
}
it seems to not work, athoulgh I think i'm really close to succesfully using the object variables for passing it between tests
Thanks in advance,
Ilija
I'm making some progress with the OnStartTest event, it seems to be evoked in the recursive funciton, but i still don't know whether to use = or some other function with the object variable type for assigning it to local variables in tests.
For example, the event looks like
//USEUNIT database
function GeneralEvents_OnStartTest(Sender)
{
var accounts = database.getAccounts(Project.Variables.user);
Project.Variables.accounts = accounts;
if (Project.Variables.accounts != null)
{
Log.Message('accouts filled');
}
}
and the simple checks confirms that the Project.Variables.accounts is not null
but whenm i try to use the accounts object type global variables in tests
....
var accounts = Project.Variables.accounts;
var i;
for (var num_cue_s in logon.accounts)
{
panel2.panel.form.panelTablerowBackgroundlightgray.panelRightcolumn.selectAccountsdropdownlist.ClickItem(accounts[num_cue_s]);
i++;
if (i > 1) break;
}
it seems to not work, athoulgh I think i'm really close to succesfully using the object variables for passing it between tests
Thanks in advance,
Ilija