motorola
13 years agoContributor
Sys.process("firefox").Exists
in my script unit, I want to check whether firefox is initiated or not by using Sys.process("firefox").Exists. basically the if..else logic is to tell testcomplete to launch firefox if exists=false and if not, then check whether there's a window pointing to a certain url.
if(Sys.Process("firefox").Exists == false)
{
//Runs the "firefox" tested application.
TestedApps.firefox.Run();
}
else
if(Sys.Process("firefox").Page("http://www.global-erp-solution.com*").Exists == false)
{
//Opens the specified page in a browser. The URL can hold either an absolute or a relative path to the page. The "Make Page object a child of the browser process" option should be turned on.
Sys.Process("firefox").ToUrl("www.global-erp-solution.com");
}
the test fails at the very first line. I don;t get it. shouldn't the execution resume to running firefox in the event firefox is not yet opened? but why do I get failed test instead?
if(Sys.Process("firefox").Exists == false)
{
//Runs the "firefox" tested application.
TestedApps.firefox.Run();
}
else
if(Sys.Process("firefox").Page("http://www.global-erp-solution.com*").Exists == false)
{
//Opens the specified page in a browser. The URL can hold either an absolute or a relative path to the page. The "Make Page object a child of the browser process" option should be turned on.
Sys.Process("firefox").ToUrl("www.global-erp-solution.com");
}
the test fails at the very first line. I don;t get it. shouldn't the execution resume to running firefox in the event firefox is not yet opened? but why do I get failed test instead?