Cannot handle 2 desktops using Robot Framework Zoomba

I’m using robot framework zoomba for my test automation. My case is:

  • I have 2 softphone which are installed in 2 separately Windows PC. So I used Open Application to open 2 remote session at http://IP1:4723/wd/hub http://IP2:4723/wd/hub
  • For each session, when the phone is launched, the application window is minimized by default, I need to “Switch Application Desktop” then Click to the locator of minimized icon.
  • It works fine at PC1. But on PC2, when “Switch Application Desktop”, it remembered the desktop of PC1, so I cannot click on the icon from PC2.
    Could someone give me an advice?


So this is a bit of an oversight on my part. Essentially the reason why this is happening this way is because each time open application is run we check for a desktop session. If it doesn’t exist we create it, if it does we just used the cached one.

Both times it attempts to use the alias of ‘Desktop’ so the 2nd time it sees that the desktop session for PC1 is there and just accepts it as the session it wants. This will require some rework but for the time being you can do this for a work around:

Run open application again for PC2 with the alias for ‘Desktop2’ and app being ‘Root’. Then anytime you want to switch to it run 'Switch Application | Desktop2’

Hope that helps

Thanks @Wolfe1 so much for your response. It’s resolved my issue for now.

@nmquan I went ahead and implemented something that should work. Let me know if you have any issue or have ideas for it. When you open your 2nd application you would do something like:

Open Application | http://ip2:4723/wd/hub | alias=MainApp2 | desktop_alias=Desktop2 …

Added the ability to call out an alias for your 2nd desktop session in Open Application, Switch Application by Name, and Switch Application by Locator.

Example test: robotframework-zoomba/WinAppDriver-DesktopTests.robot at master · Accruent/robotframework-zoomba · GitHub

If you switch back to your main application I would suggest keeping the desktop sessions grouped with it by running something like:

Switch Application | MainApp | desktop_alias=Desktop
Switch Application | MainApp2 | desktop_alias=Desktop2

This is useful for keywords that attempt to use the desktop session as a sort of retry or to locate elements that sometimes appear outside the app session (combobox sections for example).

Anyway this is in 2.10.0 which I just pushed so let me know what you think.