Currently, I'm working in windows based application. I want to do automation testing for my windows application. I start with sikuli tool, but it is just comparing the images. My application is a sports related reporter app. So i need to check the score result. whether the scores are matching or not. I am looking a good tool to automate more in my app. Does Appium supports windows automation? Which tool that most people using? My last project, that i have worked in selenium for web application automation. so i have a little knowledge in java.
Appium has the ability to automate Windows PC Desktop apps. This driver relies on a project from Microsoft called WinAppDriver, which is an Appium-compatible WebDriver server for Windows Desktop apps (and more in the future). WinAppDriver is often abbreviated "WAD". WAD is bundled with Appium and does not need to be installed separately.
The Windows Driver supports testing of Universal Windows Platform (UWP) and Classic Windows (Win32) applications.
In addition to the WAD repo, development of the Appium driver takes place at the appium-windows-driver repo.
To test a Windows app, simply make sure you have turned developer mode on. When running Appium (whether Appium Desktop or from the command line), ensure that you have started the app / cmd prompt as an administrator.
- Pull and open CalculatorTest.sln under CalculatorTest
- In Visual Studio 2015 with the test solution open build the test and select Test > Run > All Tests
- Open Microsoft Visual Studio 2015
Create the test project & solution. I.e. select New Project > Templates Visual C# > Test > Unit Test Project
Once created, select Project > Manage NuGet Packages... > Browse and search for Appium.WebDriver
- Install the Appium.WebDriver NuGet packages for the test project
- Start writing your test
I recommend pywinauto. I used it to automate Windows GUI applications. Very easy to use.
Quick example from the documentation:
from pywinauto.application import Application # Run a target application app = Application().start("notepad.exe") # Select a menu item app.UntitledNotepad.menu_select("Help->About Notepad") # Click on a button app.AboutNotepad.OK.click() # Type a text string app.UntitledNotepad.Edit.type_keys("pywinauto Works!", with_spaces = True)
- https://stackoverflow.com/users/3648361/vasily-ryabov (pywinauto developer)
You can use Winium, an open source automation framework. It is Selenium-based. You can use this framework not only for Windows Desktop applications but also for Windows Phone apps.