Katalon Studio - Crash not detected

Hi,
See to the attached videos, I simulate a regression with a simple project.
I have 2 buttons : the first opens a txt file and the second displays a MessageBox.
When the file exists, the test passes (OK.mp4). It’s logic
But if the file doesn’t exist the test also passes (CrashNotDetected.mp4). The crash is not detected. Is it normal? Due to the free version?
Thanks for your help

Manu

CrashNotDetected.zip (1.5 MB)

Do you “tell” the machine that a crash may occur and try to set a test that catches it? Machines that do not have AI testing application have to be “told”.

Hi Grylion54,
I don’t understand what you mean by “Do you “tell” the machine… and try to set a test”. Are you talking about the try/catch ?
In fact I’m surprised that the test passes because the click on button2 could not be done because of the crash.
In this topic, it’s just a sample, I have the problem with an old existing application. For me, the purpose of Katalon is to detect crashes, but maybe I’m wrong ?

You have to write your scripts that the computer will follow. If you don’t have code that has the computer test that the app has crashed, then how would it know that a crash has occurred. You can visually see the crash, but the computer cannot.

Now, it is possible that button2 still did exist on screen, unless you had a wait or delay, as the script runs a lot faster than you or I can manipulate the app.

Yes, the button2 exists but the click action isn’t possible because of the crash. The crash appears before the script clicks on the second button. For me the impossibility to click the button should be detected :slightly_frowning_face:

you can try to check if the button2 is enabled before to click it.
not sure if in your use case the button is truly ‘impossible to click’ from the code perspective … since it is present (but the form does not have the focus). the click event himself, under the hood, returns none … therefore the wrapping keyword will throw an exception only if it cannot find the element

just a guess … i am not familiar with windows app testing

LE: technically speaking, that is not a crash but just an message/error box poped-out by a certain exception catched in the app code. The runtime loop of the main form is still running, the app seems to be not even freezed/suspended.
Can we have also a look into your tescase code?

Thanks
I’m looking but I can’t find a solution…

Lets see your code first

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys

Windows.startApplicationWithTitle(‘C:\Users\XXX\source\repos\Samplekatalon\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe’,
‘Sample’)
Windows.click(findWindowsObject(‘Object Repository/RegressionSample/Button’))
Windows.click(findWindowsObject(‘Object Repository/RegressionSample/Button(1)’))
Windows.closeApplication()

Does anybody have an idea?
Thanks

Does @Katalon_team can help me ?