Forum Discussion
simon_glet
12 years agoRegular Contributor
Samuel,
Sorry about the case sensivity confusion.
I am running TC 9.2 and I wrote this to test the aliases (attached screenshot) with Acrobat Reader:
With Acrobat Reader not running no error is logged.
We extensively use WaitAliasChild for it not logging any errors when the objected referenced by the alias does not exist so I am not sure what is wrong with your code.
I learned a couple of things though.
Sincerely
Sorry about the case sensivity confusion.
I am running TC 9.2 and I wrote this to test the aliases (attached screenshot) with Acrobat Reader:
function TestAlias()
{
Log.Message("Root alias");
if(Aliases.WaitAliasChild("Acrobat_Win", 2000).Exists)
{
Log.Message("Found Root Alias");
}
else
{
Log.Message("NOT Found Root Alias");
}
Log.Message("Root case diff alias");
if(Aliases.WaitAliasChild("ACROBAT_Win", 2000).Exists)
{
Log.Message("Found case diff Root Alias");
}
else
{
Log.Message("NOT Found case diff Root Alias");
}
Log.Message("Tree Alias");
if(Aliases.AcrobatReader.WaitAliasChild("Acrobat_Win", 2000).Exists)
{
Log.Message("Found Tree Alias");
}
else
{
Log.Message("NOT Found Tree Alias");
}
//The following raises a JScript Error:
// The Aliases object does not have a child with the name "AcrobatReader.Acrobat_Win".
/*Log.Message("Full Path Tree Alias");
if(Aliases.WaitAliasChild("AcrobatReader.Acrobat_Win", 2000).Exists)
{
Log.Message("Found Full Path Alias");
}*/
}
With Acrobat Reader not running no error is logged.
We extensively use WaitAliasChild for it not logging any errors when the objected referenced by the alias does not exist so I am not sure what is wrong with your code.
I learned a couple of things though.
Sincerely