Automating Desktop application using python Robotframework

Trying to automate desktop application, but it is not launching on foreground. so far i have tried whitelibrary, AutoiT, Zoomba library, Image horizon library.
I dont want to use shortcut keys to launch the app on foreground.
Is there any possible way to crack this?

If you still have your Zoomba code, did you try the Maximize Window keyword? I ran a quick test and that seems to pop the window into the foreground if its minimized or behind other windows.

Hi, I am trying to automate a 3rd party desktop application written in .Net using pywinauto. While the automation works fine when launched from command line in a RDP session, it does not work when the robot script is launched from a scheduler (Tidal). It just fails to launch the UI. I changed the script to use white library and even that did not work. Is there a way to launch the UI in background (as in case of Tidal) or is this not going to work? Is there any other way to setup the automation in the UI?

Thanks in advance.

Hey @explorer ,

We use WinappDriver but some of our hardships and experience may help you. We ran into a similar issue where launching the UI without an active RDP session causes the application to load but the ui would load in a background session. As far as I know this will not work for windows automation, you need to force the launch to be in the active UI session.

We do this by forcing the WinAppDriver to launch for the current user:

start /B elevate paexec WinAppDriver.exe

If someone needed to log into that machine to view the tests they could but when they want to disconnect we have a specific bat script for them to run that dsiconnects them but still allows the UI session to exist:

for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
  %windir%\System32\tscon.exe %%s /dest:console

Again not sure if any of this will be helpful for your situation but it may help you avoid some pitfalls.

Hi Brandon,

Thanks for your input.

Would you know if WinAppDriver.exe is still actively supported? From what i read it seems to be deprecated unless i’m mistaken. Since the automation will be run from server do we need to run that start command first before triggering the robot automation script? I have the logging from the robot script that writes into log file and those were working fine while triggering the script manually from within RDP. So I’m hoping if WinAppDriver solution works it will work from scheduler as well.

Would you happen to know any other open source automation solution for Windows based UI applications?

WinAppDriver development has definitely been slower than the community has wanted but they did release an update a few weeks ago and have been telling the community that it is on their roadmap to reallocate a team here.

Yes the WinAppdriver would have to be running before the robot automation starts. That is unless you wish to start the driver during setup and stop it during teardown. I was running into issues on our server hardware doing it this way though, hence the script in the comment above.

As for open source windows automation there certainly are but I have limited knowledge or experience with them.

Thank you, will try it out and see how it goes.

Hi @Wolfe1,

Would you know if winappdriver can run from Windows Server 2012? In Microsoft website (WinAppDriver and Desktop UI Test Automation) it says works on Win 10, there is no mention of server support. And it also needs developer mode to be turned on which i’m not sure is even a feature in windows server and even if it is might not be a viable approach.

On the github page it says all architecture supported but it also comes with .Net bundled, don’t know if that will conflict with existing .net installed on the server or if it will overwrite existing version and cause problems.

Would you have any idea about server support and .net bundling?



I am not sure on Server 2012 as that is a part of the Windows 8 family. We are using Server 2016 and it does work there but I believe that is a part of the windows 10 family.

From these posts I would say more than likely Server 2012 is not supported :cry: