

- #Appium app image how to#
- #Appium app image install#
- #Appium app image android#
- #Appium app image Pc#
- #Appium app image windows#
#Appium app image how to#
Once we know how to find elements, there's really not much more we need to know to write our test! The only wrinkle I discovered is that, unlike Appium's behavior with mobile apps, WinAppDriver does not reset the state of applications when a session starts. Other non-dynamic elements had the AutomationId attribute set, and for these elements, we can use the corresponding attribute as the selector for the accessibility id locator strategy. I could easily find this element via the name locator strategy, or (as I ended up doing), using xpath. We can see that the Name attribute has most of the information I might want, including the date, the high and low temperatures, and a weather forecast. This is the representation of a ListItem element which shows a particular day of the week along with a little weather summary. I found it to be quite useful, with plenty of sections like this, that clued me into the most helpful available attributes: After I was able to launch a session using the capabilities above, I ran driver.getPageSource() to have a look at the source XML.

I found the Weather app to be quite well-instrumented with automation-ready IDs and labels.

Ultimately, when put into Java client form, my capabilities look like: DesiredCapabilities caps = new DesiredCapabilities() Ĭaps.setCapability( "platformName", "Windows") Ĭaps.setCapability( "platformVersion", "10") Ĭaps.setCapability( "deviceName", "WindowsPC") Ĭaps.setCapability( "app", "Microsoft.BingWeather_8wekyb3d8bbwe!App") ĭriver = new AppiumDriver( new URL( " caps) (The WinAppDriver docs also list several other capabilities that might be useful for your purposes, so check them out too.) The app I chose to automate for this article was the built-in Weather app, which had the ID Microsoft.BingWeather_8wekyb3d8bbwe!App. This will list all the installed apps along with their App IDs. c24c8163-548e-4b84-a466-530178fc0580_scyf5npe3hv32!Appįor an app that you haven't created, like a built-in system app, I discovered a neat trick of opening up a PowerShell window and running the following command: get-Startapps You can find the Application Id of your application in the generated AppX\vs.appxrecipe file under RegisteredUserModeAppID node. For an app that you've created, the WinAppDriver docs state:
#Appium app image windows#
Which capabilities are necessary for use with Windows app automation? Pretty much just the typical ones:Īpp should be set to the App ID of the app you want to test. All that's left is to decide what to automate! Windows Automation Desired Capabilities
#Appium app image install#
Use the NPM binary installed with Node to download the most recent version of Appium: npm install -g appium.Start an Admin command prompt (type "cmd" into the Start menu and then hit CTRL+SHIFT+ENTER to launch the command prompt in Admin mode).

Navigate to "Developer Settings" under "System Settings", and turn on "Developer Mode" (this is required for WinAppDriver to control the desktop).Here's everything that I needed to do to get Appium set up to automate Windows apps: (Your client script, of course, can run anywhere you like as long as it can connect to Appium running on Windows over the network.)
#Appium app image Pc#
What do you need to run automated tests of native Windows apps? Well, it goes without saying that you need a Windows PC to host and run your applications, as well as running the Appium server that will perform the automation. WinAppDriver is essentially an Appium-compatible automation interface, which Appium automatically includes if you specify the appropriate desired capabilities for your test. In this article, we'll take a look at how to use Appium to automate Windows desktop apps.Īutomation of Windows apps is actually quite a special thing in the Appium world, since Microsoft itself supports this automation via the development of a tool called WinAppDriver.
#Appium app image android#
While iOS and Android remain the most popular use case for Appium, it is also possible to use Appium to automate a host of other platforms, including Windows and Mac desktop applications. One of the great things about Appium is that it can be used for far more than mobile app automation.
