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
--- 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