App.focus failed: xxxxxxx.exe not found
Hi,
I'm trying to handle Windows .NET app crash case on automatic tests but got a problem with App.focus(). By some reason Sikuli's Message log contains always this error with red color even I try to handle such case with if statement. I'm not sure whether this is ok or not. Just want that crash is handled if exists and if not then continue.
Crash happens only sometimes and application close dialog goes behind the frozen window and sometimes not. Sometimes crash handling is needless and code executes crash handling just in case if app frozes or something unexpected happens. Trying to create as simple crash handling as possible.
Error:
[error] App.focus failed: ap15vNET.exe not found
crash handling code:
def handlecrash(
try:
# check if exists before set the focus
if exists(
# set focus
print "Form: "+ app_name + ".exe" + " fokus set."
else:
print "Form: "+ app_name + ".exe" + " not found."
except:
pass
# dialog is closed with clicking the close button
try:
# wait until crash dialog vanishes and then click close button
wait(
except:
pass
else:
click(
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: