Windows: switchApp has problems with (multiple) minimized application windows

Bug #682281 reported by Anti Tree
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Medium
RaiMan

Bug Description

switchApp() does not open a window when multiple instances of an application are minimized in Windows. Tested in Windows XP, Windows 7, and Server 2008 32 and 64bit. Specifically tested with IE, Firefox, and Chrome.

- It does work using Internet Explorer in Windows 7 but no other OS.
- It does work if the window is already expanded

Steps to reproduce:
- open two tabs in Internet Explorer and then minimize it
- run something like switchApp("Internet Explorer")
- The application will be highlighted in the task bar but no window will appear.

Performed tests in the following scenarios:
Windows 7, Internet Explorer - PASS
Windows 7, Firefox - FAIL
Windows XP, Internet Explorer - FAIL
Windows XP, Firefox - FAIL
Windows XP, Chrome - FAIL
Windows Server 2008 R2, Internet Explorer - FAIL
Windows Server 2008 R2, Firefox - FAIL
Windows Server 2008 R2, Chrome - FAIL

Tags: fkt-app
Revision history for this message
RaiMan (raimund-hocke) wrote :

--- I confirm, that this really happens ( uuhps - does not happen ;-)

I tested on Win7 with IE and only the first window opened on the first run, but never again. switchApp() always returns 0, which means that the window was found.

--- I successfully tested the following workaround:
# window title of a minimized window contains "some text"
switchApp("some text"); wait(1); type(" ", KEY_ALT); type("x")

This opens the minimized Window to fullscreen.

--- general comment
in Windows the app when using switchApp() is identified by inspecting the window title. So generally it is recommended to use some contained text, that uniquely identifies the window

summary: - switchapp problem handing multiple instances of applications in Windows
+ Windows: switchApp has problems with (multiple) minimized application
+ windows
Revision history for this message
Michael A. Phillips (maphilli14) wrote :

Confirmed and Raimund's work around works great.

--- didn't work
switchApp("Ixia")

---works
IxNetwork = "20121003" # This is the saved file name that is displayed in the main window
LogView = "LogView" # This is a subwindow

switchApp(IxNetwork)
click(something)
switchApp(LogView)
find()
switchApp(IxNetwork)

Changed in sikuli:
status: New → Confirmed
RaiMan (raimund-hocke)
Changed in sikuli:
assignee: nobody → RaiMan (raimund-hocke)
status: Confirmed → In Progress
milestone: none → x1.0
RaiMan (raimund-hocke)
tags: added: fkt-app
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Undecided → Low
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: x1.0 → none
Revision history for this message
shimon doodkin (helpmepro1) wrote :

found some code, but could not make it work
http://stackoverflow.com/questions/13761916/how-to-restore-a-minimized-window-from-system-tray

finally solved it by clicking on taskbar

Revision history for this message
shimon doodkin (helpmepro1) wrote :

i had a window without taskbar menu

Revision history for this message
Parn Yin (pyin) wrote :

FYI, this bug happens with minimized one(not multiple)Calculator in Win7 also.

[Steps to Reproduce]
(1) Open Calculator.
(2) Minimize it.
(3) Use the script below in Sikuli IDE.
        switchApp("Calculator")
        type("h", KeyModifier.CTRL)

[Actual Result]
The Ctrl+H works in Calculator window.(The history panel of it)
But the Calculator is not brought to the front.

RaiMan (raimund-hocke)
Changed in sikuli:
milestone: none → 1.1.0
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 1.1.0 → 1.2.0
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 2.0.0 → 2.1.0
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Low → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.