[request] Windows: want better support with App.focus() and switchApp()?
Bug #1008113 reported by
ABET
This bug report was converted into a question: question #199255: bug on focus() or switchApp?.
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
In Progress
|
Medium
|
RaiMan |
Bug Description
Is there some bug with focus() or switchApp() handled on windows? I noticed that if I use the same method on mac it works find and puts the application in the front, but when using it on windows it does not.
what I did was put the application (ff) behind a different application (ie) and want to get a focus on it so it becomes the application in front.
code:
switchApp(
or
ff = App('firefox')
ff.focus()
- another q, is that if the application is minimized (win or mac), would focus() also work and open the application and put it in focus()?
Changed in sikuli: | |
milestone: | 2.0.0 → 2.1.0 |
To post a comment you must log in.
This is not a bug, but behavior based on the selected solutions in the different systems, which are totally different on Mac and Windows.
--- on Mac
you really focus an application (which might not even run), but you have no chance to tell a special window to come to front.
The frontmost window depends on the "history" of the application's windows.
So in the case of all windows of the application being hidden, the last one, that was hidden, will come up with focus.
If at least one window is visible, focus will not change (and cannot do it with Sikuli features) anything on the windows's z-order.
--- on Windows
Handling of running applications is done based on identifying part of the window title. This is special with FF in some versions, since FF might not have any window titles (see faq 1667, faq 1730 might be of interest too).
Hidden (minimized) windows are not recognized by Sikuli currently.
--- Conclusion:
If you make scripts, that should run on Windows and Mac, you have to script different actions for each system (see docs additionally).