QT_David
12 years agoOccasional Contributor
verify if object exists without error
Hi,
Can you please clearify how to verify if an object exists without getting an 'unable to find the object' error? Below jscript code will not be able to verify a non existing panel:
TestedApps["iexplore"].Params.SimpleParams.CommandLineParameters = "http://smartbear.com/";
TestedApps["iexplore"].Run();
var test1 = Sys.Browser("iexplore", 1).Exists; // => works
var test2 = Sys.Browser("iexplore", 1).Page("http://smartbear.com/").Panel(999).Exists; //=> Error: Unable to find the object Panel(999)
BR, David
(TC version 9.0.1312.7)
Can you please clearify how to verify if an object exists without getting an 'unable to find the object' error? Below jscript code will not be able to verify a non existing panel:
TestedApps["iexplore"].Params.SimpleParams.CommandLineParameters = "http://smartbear.com/";
TestedApps["iexplore"].Run();
var test1 = Sys.Browser("iexplore", 1).Exists; // => works
var test2 = Sys.Browser("iexplore", 1).Page("http://smartbear.com/").Panel(999).Exists; //=> Error: Unable to find the object Panel(999)
BR, David
(TC version 9.0.1312.7)