← Back to team overview

sikuli-driver team mailing list archive

[Question #231485]: What kind of error is raised when App.focus fails?

 

New question #231485 on Sikuli:
https://answers.launchpad.net/sikuli/+question/231485

i would like to be able to do some exception handling for situations where App.focus fails. however i wasn't able to find anything about this in the docs. im trying to do something like this:

from subprocess import Popen
#try to focus on an app
try:
    App.focus('Login')
# use Popen if the app is not found
except Exception:
    Popen([r'path to some app',], )

unfortunately using this method i get this error:
[error] App.focus failed: Login not found 

thanks in advance for any help you can give me.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.