Home

Awesome

Warnings:

Because XamlControlGalary app changed a lot, the test cases would fail. So I will not maintain the test cases on this repo anymore. If you are looking for:

  1. Jest + selenium-webdriver + WinAppDriver, please refer to selenium-appium example.
  2. Jasmine + WebDriverIO + WinAppDriver, please refer to wdio-winappdriver-example

I created a open source WinappDriver, welcome to try it: YWinAppDriver

Below are the old Readme

This repo is already merged into WinAppDriver repo

winappdriver-js-webdriver-example

There are two popular JavaScript WebDrivers which could be used for WinAppDriver testing: selenium-webdriver and webdriverio.

This is used to demo UI automation testing with WinAppDriver which the test runner is JavaScript. It includes the examples and Azure Pipeline with selenium-webdirver and WebDriverIO.

  1. Jest + selenium-webdriver + WinAppDriver
  2. Jasmine + WebDriverIO + WinAppDriver

WinAppDriver is recommended to do E2E test for Windows apps. Here I validate Xaml-Controls-Gallery application using JavaScript + WinAppDriver.

This test project highlights the following basic interactions to demonstrate how UI testing using Windows Application Driver work.

I prototyped and successfully made the two webdrivers to be happy with WinAppDriver. And you can use any of them on your project.

Examples

I provided two examples which are using selenium-webdriver or webdriverio.

selenium-webdriver is the offical WebDriver JavaScript binding from selenium project. Unfortunately selenium-webdriver doesn't support Mobile JSON Wire Protocol Specification. selenium-appium is selenium-webdriver extension to make selenium-webdriver to drive Appium to run automation.

WinAppDriver doesn't implement w3c WebDriver completely, so currently I workaround the problem by WebDriver. In your project, you have to use private webdriver in package.json lke this:

    "webdriverio": "^5.10.1",
    "webdriver": "git+https://github.com/react-native-windows/webdriver.git",

Azure pipeline for WinAppDriver

Please refer to .ado folder in this project. For WinAppDriver, see WinAppDriver in CI with Azure Pipelines

Dependencies

Note

To know more about how to integrate JavaScript test runner and WinAppDriver for UI automation, please refer to:

  1. Jest + selenium-webdriver + WinAppDriver
  2. Jasmine + WebDriverIO + WinAppDriver