sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27442
Re: [Question #252592]: How to determine which screen my application is running on?
Question #252592 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252592
Status: Open => Answered
RaiMan proposed the following answer:
On Windows, the App class is not very helpful with the modern browsers
not showing the classic window titels (which is the item on Windows to
be used with focus()).
This is especially true for Chrome.
At least this works:
chrome = App.open("path to the chrome executable")
wait(3)
win = chrome.window()
this should give you the frontmost window and only works if Chrome is
not already started.
… but surprise:
this might be anything but what you think.
just try this and scratch your head:
for i in range(100):
r = chrome.window(i)
if not r: break
print "%d: %s" % (i, r)
if you somehow find out the window title of a visible Chrome window, then you might bring this window to front:
App.focus("significant part of the window title")
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.