You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two popular JavaScript WebDrivers which could be used for WinAppDriver testing: [selenium-webdriver](https://www.npmjs.com/package/selenium-webdriver) and [webdriverio](https://webdriver.io/).
3
+
4
+
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.
5
+
1. Jest + selenium-webdriver + WinAppDriver
6
+
2. Jasmine + WebDriverIO + WinAppDriver
7
+
8
+
9
+
[WinAppDriver](https://github.com/Microsoft/WinAppDriver) is recommended to do E2E test for Windows apps.
10
+
Here I validate [Xaml-Controls-Gallery](https://github.com/Microsoft/Xaml-Controls-Gallery) application using JavaScript + WinAppDriver.
11
+
12
+
This test project highlights the following basic interactions to demonstrate how UI testing using Windows Application Driver work.
13
+
- Azure pipeline
14
+
- Finding element using 'accessibility id' and 'name'
15
+
- Sending click action to an element
16
+
- Retrieving element value
17
+
- WinAppDriver integration with WebDriverIO and selenium-webdriver
18
+
19
+
I prototyped and successfully made the two webdrivers to be happy with WinAppDriver. And you can use any of them on your project.
20
+
21
+
## Examples
22
+
I provided two examples which are using selenium-webdriver or webdriverio.
23
+
24
+
-[selenium-webdriver example](packages/selenium-webdriver/README.md) in packages/selenium-webdriver
25
+
26
+
selenium-webdriver is the offical WebDriver JavaScript binding from selenium project. Unfortunately selenium-webdriver doesn't support [Mobile JSON Wire Protocol Specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol).
27
+
[selenium-appium](https://www.npmjs.com/package/selenium-appium) is selenium-webdriver extension to make selenium-webdriver to drive Appium to run automation.
28
+
29
+
-[webdriverio example](packages/webdriverio/README.md) in packages/webdriverio
30
+
31
+
WinAppDriver doesn't implement w3c WebDriver completely, so currently I workaround the problem by [WebDriver](https://github.com/react-native-windows/webdriver). In your project, you have to use private webdriver in package.json lke this:
Please refer to [.ado](.ado) folder in this project.
39
+
For WinAppDriver, see [WinAppDriver in CI with Azure Pipelines](https://github.com/microsoft/WinAppDriver/blob/master/Docs/CI_AzureDevOps.md)
40
+
41
+
## Dependencies
42
+
* Install nodejs, make sure a recent version of [Node.js](https://nodejs.org) is installed.
43
+
[Chocolatey](https://chocolatey.org/) is the recommended installation method. But you can also install Node directly from [NodeJs](https://nodejs.org/en/download/). To use chocolately, from an elevated Command Prompt, run:
44
+
```
45
+
choco install nodejs
46
+
```
47
+
* Install [Yarn](https://yarnpkg.com/en/docs/install) (*optional* if you use npm command directly)
48
+
49
+
* Install 'xaml controls Gallery'
50
+
- Download and Install it from Microsoft Store.
51
+
- Or build and deploy Xaml-Controls-Gallery submodule
52
+
53
+
* Install the most recent stable [WinAppDriver](https://github.com/Microsoft/WinAppDriver/releases) on the test device
0 commit comments