← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #169505]: Get the active window

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Yes, that is a general problem with the window features of the class
App.

Especially on Windows, recent apps (e.g. browsers like Firefox and
Chrome) have many windows open but invisible, that are recognized by
Sikuli.

You have to evaluate your situation with a little test script, that
shows you the app's windows configuration:

# be sure your app is active

 for i in range(100):
     print app.window(i)
     if not appWindow: break

this will print out the region information for every window. You will
find criterias to filter windows, you do not want (like the above
arbitrary 200).

In general, you have to verify somehow (e.g. check for visual content
(or textual if possible)), that the window you get is the one you want.

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