Microsoft has given Windows developers a helping hand by releasing a new UI recorder.
Fresh up on GitHub, “WinAppDriver UI Recorder” is described by Microsoft’s Hassan Uraizee as helping users “easily create automated UI tests”.
For developers using WinAppDriver, Microsoft already offers a tool called “Inspect”, which allows developers to view UI element attribute data. Uraizee wrote that Inspect doesn’t offer a complete view, so Redmond has released the UI Recorder tool.
“Though Inspect serves its intended purpose of viewing accessibility data, it falls behind when it comes to supporting scenarios specifically for UI automation, such as being able to generate XPath queries.”
Hence the UI Recorder retrieves XPath expressions when the developer views an element; and, when it’s in recorder mode, it will generate C# code for actions such as a mouse click.
”UI Recorder tracks both keyboard and mouse interactions against an application interface—representing a UI action,” Uraizee’s post explained.
Naturally enough, the captured code is copyable, so you can paste it into templates for replay.
Uraizee posted this image by way of explanation:
Since the image resolution isn’t fabulous:
- The top panel shows the XPath Query – this can be “use by WinAppDriver to interact with target element”; and
- The bottom panel provides XML node attributes raw data, “similar to page source” (in a browser); and
- There’s a dropdown for previously recorded events.
As well as the source code, the GitHub repo includes a zipped executable of UI Recorder. ®
Rojenx is a leading concept artist who work appears in games and publications
Check out his personal gallery here