dcfecker
6 years agoContributor
when closing My Application under test, TestComplete errors out with Application.exe process crashed
Code being executed:
CloseLE.Click(); // "X" to close LE
Aliases.Live_Earth.AreYouSureClose.Close.Click(); // Close confirmation
if(Aliases.Live_Earth.Exists && Aliases.Live_Earth.SaveForNextTi...
- 6 years ago
If you close the application, then it no longer exists. If it doesn't exist, then the object Aliases.Live_Earth is no longer a valid object. SO, you can't call "Exists" property from a non-existant object.
A better way to check for existance is the following:
CloseLE.Click(); // "X" to close LE Aliases.Live_Earth.AreYouSureClose.Close.Click(); // Close confirmation var liveEarthProcess = Aliases.WaitAliasChild('Live_Earth', 2000); if(liveEarthProcess.Exists && liveEarthProcess.WaitAliasChild('SaveForNextTime', 2000).Exists) { Aliases.Live_Earth.SaveForNextTime.Discard.Click(); }