sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12829
[Question #207341]: App.focus failed: xxxxxxx.exe not found
New question #207341 on Sikuli:
https://answers.launchpad.net/sikuli/+question/207341
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(app_name):
try:
# check if exists before set the focus
if exists(App.focus(app_name + ".exe")):
# set focus
App.focus(app_name + ".exe")
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("crash_closebtn_gfx.png",5)
except:
pass
else:
click("crash_closebtn_gfx.png")
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.