Inspecting UI Elements for WinAppDriver automation using Appium Desktop — Continued

Canhua Li
2 min readNov 29, 2020

--

This is a follow up on Inspecting UI Elements for WinAppDriver automation using Appium Desktop | by Canhua Li | Medium

Appium and WinAppDriver version has a hard binding relationship, here is an way to inspect any version of WinAppDriver with Appium desktop.

  • Software Preparation

WinAppDriver: Releases · microsoft/WinAppDriver (github.com)

Appium Desktop: Releases · appium/appium-desktop (github.com)

YWinAppDriver: Releases · licanhua/YWinAppDriver (github.com)

  • Start WinAppDriver

C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe

  • Start appium desktop and open new session window
  • Fill the capabilities and other parameters
  • Click Start Session

Tricky

  • Location mismatch

Most of time, when you click an element in App Source, the location doesn’t match with the blue mask. Below is a perfect match.

Resize testapp and appium desktop to make sure you can see both test app, and appium are not totally overlapped, then activate the test app by clicking its title bar, then click refresh source & screenshot . then maximize the appium desktop window, and you will see the position is perfect matched.

  • Not all elements showed in Appium Desktop

You can use YWinAppDriver first, then remove Body from XPath to get XPath for WinAppDriver. (The statement may be wrong because I just some basic verfication)

WinAppDriver XPath: /Window/Window/Button[2]

YWinAppDriver XPath: /Body/Window/Window/Button[2]

--

--