How to use new winAppDriver feature "Attaching to an Existing App Window" in Appium v1.6.5?

in winAppDriver v1.0, there is a new feature “Attaching to an Existing App Window”.
please refer the details in https://github.com/Microsoft/WinAppDriver.

and I am using robotframework+appiumlibrary+Appium+winAppDriver to do the automation of my windows application.
i want to use the new feature mentioned above in Open Application keyword in robotframework appiumlibray

e.g
Open Application platformName=Windows deviceName=WindowsPC app=Root automationName=appium
Open Application platformName=Windows deviceName=WindowsPC appTopLevelWindow= automationName=appium

it failed when opening the handler, in the appium server log, it is said that “Option ‘app’ is required”.

then if i add the app argument as below:
Open Application platformName=Windows deviceName=WindowsPC app=Root automationName=appium
Open Application platformName=Windows deviceName=WindowsPC appTopLevelWindow= app=Root automationName=appium

in the appium server log, there is winAppDriver error: “invalid argument: bad capabilities: specify either app or appTopLevelWindow to create a session”

so how can Appium support this new winAppDriver feature? how to make this work?

thanks!

Hey @vicky ,

I have been working on extending my company’s testing library to include Robot keywords for desktop applications testing using WinAppDriver and Appium. While I found AppiumLibrary worked it also lacked a lot of functionality we needed, especially in mouse control. I just recently released the first version of it and would love to get your feedback if you are still using WinAppDriver and Robot for testing.

The repository is located here, the specific part that will interest you is the DesktopLibrary. There are quite a few example tests using the built in windows calculator. Raise an issue on the repo if you have any questions!

1 Like

Hi I’m trying to automate a WinForm application.
Can i use this robot library for my windows automation

Hey @Sachin_Daniel_Varkey

Shouldn’t be an issue, just when you reference your app you will need to use its full path rather than the app id the uwa/uwp apps have.