A new open-source tool, licensed under MIT, is now available for the WinAppDriver (Windows Application Driver) community: the WinAppDriver UI Recorder tool. Contrary to what its name might suggest, this tool is not dedicated to drivers but rather helps to create easier automated user interface tests.
For those of you who do not know WinAppDriver, this is a Windows 10 user interface automation service that you can use to test your applications.
For developers who already use WinAppDriver, Microsoft already offers a tool called "Inspect", which allows developers to view the attribute data of the user interface elements. Hassan Uraizee, of Microsoft, explained that Inspect does not offer a complete view, which is why Microsoft released the UI Recorder tool.

"Although Inspect is meeting its goal of viewing accessibility data, it is not up to par to support scenarios specific to UI automation, such as XPath query generation. For such situations, the WinAppDriver UI Recorder tool hopes to fill Inspect's gaps and serve as an alternative. "
In this release, the UI Recorder tool will enable two key scenarios:
Inspect the UI elements and retrieve their XPath expressions;
Generate C # code for some actions (mouse click) when "Save" is active
The generated code can be pasted into the UI recorder folder for reading WinAppDriver
Hassan explains that UI Recorder follows keyboard and mouse interactions with an application interface representing an action of the user interface. When recording is active, the top and bottom panels are updated dynamically with variable information on the user interface element each time a new user interface action takes place. The top pane displays the generated XPath query of the currently selected UI element, and the bottom pane displays the raw XML information for the same item. You can access the C # Code tab in the lower pane to view the generated C # code of the saved action that you can use on a WinAppDriver test.
The following animation provides an example of the registration process:
It should be noted that Microsoft recommends the use of Visual Studio 2017 to compile UI Recorder. A compressed executable file is also available on GitHub.

Leave a Reply