← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #166129]: App.open() in mac

 

Question #166129 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/166129

    Status: Open => Answered

RaiMan proposed the following answer:
principally that is ok, but I usually use it this way:

appXXX = App("Application Name") # to remember the App object for later use
appXXX.focus() # brings to front (opens it if not already opened)
while not appXXX.window(): wait(1) # waits for at least one window to be open
wAppXXX = appXXX.window() # region of window 0 
# some code here
wAppXXX.click("some image inside window.png")
# some more code
appXXX.close()

Important: with App("Application Name"), "Application Name" only works, if the app can be found in the standard locations and if it is the bundle name (usually the name of the app folder, but sometimes it is different (can be found in the Info.plist of the app or in the activity monitor, when it is running)) and might not be the name displayed left hand in the menu bar (e.g. Sikuli IDE is displayed, but the bundle name is Sikuli-IDE, Netbeans is displayed, but the bundle name is Netbeans 6.9, ...).
If it is not in a standard place, just use the full path to the app.

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