Skip to content

Commit 1a7e6da

Browse files
authored
Merge pull request #44 from react-native-windows/updatepackage
version 1.0.0
2 parents cb45b4f + a7c45d6 commit 1a7e6da

10 files changed

+3770
-7889
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ selenium-appium is [selenium-webdriver](https://seleniumhq.github.io/selenium/do
55
[![Monthly Downloads](https://img.shields.io/npm/dm/selenium-appium.svg)](https://npmjs.org/package/selenium-appium)
66
[![Build Status](https://dev.azure.com/ReactNativeWindows/selenium-appium/_apis/build/status/PR?branchName=master)](https://dev.azure.com/ReactNativeWindows/selenium-appium/_build/latest?definitionId=3&branchName=master)
77

8+
## Break changes
9+
1. [email protected] The default URL is changed from `http://localhost:4723/wd/hub` to `http://localhost:4723`. The goal is to remove appium from the project and use [winappdriver](https://www.npmjs.com/package/winappdriver) to launch and stop WinAppDriver
10+
811
### Features
912
1. A bridge to make selenium-webdriver to drive appium for native app automation. Implement [Mobile JSON Wire Protocol Specification](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md) locator which selenium-webdriver doesn't support.
1013
2. Supports PageObject Pattern for selenium-webdriver
@@ -209,29 +212,32 @@ selenium-appium projected is created when I prototype automation for react-nativ
209212

210213
Although [WebDriverIO](https://webdriver.io/) provides webdriver for Appium, it has some restrictions:
211214
1. Selenium has very large user base in browser automation, but [WebDriverIO API](https://webdriver.io/docs/api.html) is different from [selenium javascript API](https://seleniumhq.github.io/selenium/docs/api/javascript/)
212-
2. WebDriverIO has problem to support WinAppDriver, for example, https://github.com/webdriverio/webdriverio/pull/4369
213-
215+
2. [Already fixed] WebDriverIO has problem to support WinAppDriver, for example, https://github.com/webdriverio/webdriverio/pull/4369
214216

215217
Unfortunately selenium-webdriver doesn't support [
216218
Mobile JSON Wire Protocol Specification](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md). And that's why selenium-appium project is created.
217219

218-
219220
## Note
220221
To know more about how to integrate JavaScript test runner and WinAppDriver for UI automation, please refer to:
222+
- [WinAppDriver + WebDriverIO example](https://github.com/licanhua/wdio-winappdriver-example). Example to demostrate WinAppDriver and WebDriver integration without appium dependency
223+
221224
- [E2E test](https://github.com/microsoft/react-native-windows/blob/master/vnext/docs/E2ETest.md) on React Native for Windows. [MoreAboutE2ETest.md](https://github.com/microsoft/react-native-windows/blob/master/vnext/docs/MoreAboutE2ETest.md) provides some background why React Native Windows choose WinAppDriver and node test runner for E2E testing.
222225

223226
- [winappdriver-js-webdriver-example](https://github.com/react-native-windows/winappdriver-js-webdriver-example), Which includes:
224227
1. Jest + selenium-webdriver + WinAppDriver
225-
2. Jasmine + WebDriverIO + WinAppDriver
228+
2. Jasmine + WebDriverIO + WinAppDriver. This part is obselete, please refer to [WinAppDriver + WebDriverIO example](https://github.com/licanhua/wdio-winappdriver-example) for newer change.
226229

227230
- [selenium-webdriver-winappdriver-example](https://github.com/react-native-windows/selenium-webdriver-winappdriver-example).
228231
An example of jest, selenium-webdriver and winappdriver integration
229232

230233
- [selenium-appium](https://github.com/react-native-windows/selenium-appium). selenium-appium is selenium-webdriver extension to make selenium-webdriver to drive Appium to run automation for native, hybrid and mobile web and desktop apps.
231234

232235
- [Choose the right E2E automation framework for React Native Windows](https://medium.com/@licanhua/choose-the-right-e2e-automation-framework-for-react-native-windows-83ade8b16b52)
236+
233237
- [How to: Use Jest + selenium-webdriver + WinAppDriver to do Windows UI testing](https://medium.com/@licanhua/how-to-use-jest-selenium-webdriver-winappdriver-to-do-windows-ui-testing-c9d074e698ed)
238+
234239
- [Automated Windows UI testing by Jest + selenium-appium + selenium-webdriver + WinAppDriver](https://medium.com/@licanhua/automated-windows-ui-testing-by-jest-selenium-appium-selenium-webdriver-winappdriver-6cb708121d71)
240+
235241
- [Inspecting UI Elements for WinAppDriver automation using Appium Desktop](https://medium.com/@licanhua/inspecting-ui-elements-for-winappdriver-automation-using-appium-desktop-8f178b2d0d6c)
236242

237243
## License

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ steps:
8686
- task: Windows Application Driver@0
8787
inputs:
8888
OperationType: 'Start'
89-
WADArguments: 127.0.0.1 4723/wd/hub
89+
WADArguments: 127.0.0.1 4723
9090
AgentResolution: 1080p
9191

9292
- task: CmdLine@2

example/README.md

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
## Example to do Calulator automation on Windows
2-
1. Download and install WinAppDriver: https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi
2+
1. Download and install WinAppDriver: https://github.com/microsoft/WinAppDriver/releases
33
2. cd to example directory and install packages.
44

55
`yarn install` or `npm install`
66

7-
3. start appium
7+
3. start winappdriver or ywinappdriver
88

9-
`yarn run appium` or `npm run appium`
9+
`npx winappdriver` or `npx ywinappdriver`
1010

11-
expect output
12-
```
13-
[Appium] Welcome to Appium v1.14.1
14-
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
15-
```
11+
[WinAppDriver](https://github.com/microsoft/WinAppDriver) is supported by Microsoft.
12+
[YWinAppDriver](https://github.com/licanhua/YWinAppDriver) is an open source project which implemented WinAppDriver's functionality, and is developed by Canhua Li
1613

1714
4. run jest test
1815

example/__tests__/By2.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { capabilities } from '../Setup'
99

1010
jest.setTimeout(50000);
1111

12-
const url = 'http://localhost:4723/wd/hub'
12+
const url = 'http://localhost:4723'
1313

1414
describe('By2', () => {
1515
test("By2 used in selenium-webdriver.WebDriver", async () => {

example/__tests__/Driver2.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { capabilities } from '../Setup';
44

55
jest.setTimeout(50000);
66

7-
const url = 'http://localhost:4723/wd/hub'
7+
const url = 'http://localhost:4723'
88

99
describe('driver', () => {
1010
test("simple webdriver2, and driver create from WebDriver", async () => {

0 commit comments

Comments
 (0)