cancel
Showing results for 
Search instead for 
Did you mean: 

when closing My Application under test, TestComplete errors out with Application.exe process crashed

SOLVED
Contributor

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.SaveForNextTime.Exists) {
   Aliases.Live_Earth.SaveForNextTime.Discard.Click();
}

 

"The Live Earth.exe process crashed" is being logged for line 3 of the above code. This didn't used to happen. I would be able to close, and then re-open the application under test without issue. What changed? Why Am I getting a "process crashed" message when I'm simply closing the Tested App to then re-open it?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: when closing My Application under test, TestComplete errors out with Application.exe process cra

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();
}

Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
5 REPLIES 5
Highlighted
Community Hero

Re: when closing My Application under test, TestComplete errors out with Application.exe process cra

What happens if you do the exact same test steps manually?  Does the .exe still crash?

Community Hero

Re: when closing My Application under test, TestComplete errors out with Application.exe process cra

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();
}

Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Contributor

Re: when closing My Application under test, TestComplete errors out with Application.exe process cra

That was close. I ended up making the assignment before the close confirmation and that seems to work. 

 

Thanks!

 

    CloseLE.Click(); // "X" to close LE
    var liveEarthProcess = Aliases.WaitAliasChild('Live_Earth', 2000);
    Aliases.Live_Earth.AreYouSureClose.Close.Click(); // Close confirmation
Contributor

Re: when closing My Application under test, TestComplete errors out with Application.exe process cra

Maybe it is actually Crashing...

 

The second time I ran it I got the same message: The Live Earth.exe process crashed.

 

But I'm getting no other indication that the executable is crashing, it's shutting down like normal and when I start it up again the things I changed are saved.

Community Hero

Re: when closing My Application under test, TestComplete errors out with Application.exe process cra

Hi,

 

> I ended up making the assignment before the close confirmation and that seems to work. 

Robert's suggestion is more correct, because, obviously, you will get a reference to the currently running process if you do this before closing it.

Also you may try to give your tested application some time to close by putting a, say, 5seconds delay after the .Close() command and before the block that checks if the application was closed.

Finally, you may consider the Report Generator utility provided with TestComplete (https://support.smartbear.com/testcomplete/docs/testing-with/advanced/tracing-critical-errors/report...) to check if your tested application indeed crashes in some way and contact Support via the https://support.smartbear.com/message/?prod=TestComplete form providing them with your findings.

 

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win