App.open() in mac

Asked by Truptimayee Rath

I want to open an application through App.Open. I have written like App.open("Application name").I am getting error nessage.Is it the righr way to use the command

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

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.

Can you help with this problem?

Provide an answer of your own, or ask Truptimayee Rath for more information if necessary.

To post a message you must log in.