

One way to find elements is to use session’s FindElementsByXPath(string XPath) method, which takes the XPath string as a parameter. You can now select the elements you need and use their attributes by clicking the “Record” button and hovering on the target element. You can find the tool in the WinAppDriver source code downloaded earlier at the beginning of this article. UI Recorder is an open-source tool for selecting UI elements and viewing their attributes’ data. Our tests should be able to locate elements so we can react with them. Locating Elements Using the WinAppDriver UI Recorder Tool For this, there is one more attribute named which should be added along with every test method we create. We also need to mark our methods as executable tests.

Create a StartWinAppDriver() method for starting the service.Create a new class called TestsBase where all the Appium settings and the session initialization will be described.Select as package source and install the Appium.WebDriver NuGet.Alternatively use the keyboard sequence Alt T N N without holding the Alt key. Right-click on the project and select “ Manage NuGet Packages”.Open your Visual Studio and create a new Unit Test (.NET Core) project with.Download the WinAppDriver source code so you can benefit from the UI Recorder tool.Install the Windows Application Driver.

