[Java] Not able to get App window as Region object on MAC

Asked by Amit

Following is the code using Java

 String sim = "safari";

   App emu = new App(sim);

   System.out.println("Before creating region");
   emu.focus();
   Thread.sleep(5000);
   System.out.println("Focus Successful");

   final Region emulatorArea = new Region(emufocusedWindow())

Its hanging at final Region emulatorArea = new Region(emufocusedWindow())

KIndly help

Best Regards,

Amit

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

You might read through for details and usage of class App (http://sikuli.org/docx/globals.html#controlling-applications-and-their-windows)

String sim = "safari";

App emu = new App(sim);

System.out.println("Before creating region");
emu.focus();
Thread.sleep(5000);
System.out.println("Focus Successful (hopefully ;-)");

Region emulatorArea = emu.window()
emulatorArea.highlight(2)

BTW: tested with rc3 (don't know wether this is relevant)

Can you help with this problem?

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

To post a message you must log in.