Forum Discussion
AlexKaras
9 years agoCommunity Hero
And one more bonus from Aliases (which might be of special interest for those who like to have something like Page Object pattern for their tests). This was figured-out occasionally and confirmed by Support later.
-- Aliases use a kind of 'late binding' that is evaluated when the referenced object is resolved in code.
E.g.:
This pseudo code will *not* work because of 'object not found' error (assuming Notepad is not running):
var oEdit = Sys.Process("Notepad").FindChild("EditWnd");
function main
{
TestedApps.Notepad.Run();
oEdit.Keys("Test");
}
While this code will run because of late binding provided by Aliases:
var oEdit = Aliases.Notepad.EditWnd;
function main
{
TestedApps.Notepad.Run();
oEdit.Keys("Test");
}