Skip to content

Commit fc8abd0

Browse files
committed
add instructions for setting up Android to README
1 parent 75e0c79 commit fc8abd0

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,49 @@
11
# ionic-e2e-react-webdriverio-appium
22
Example ReactJS App for Ionic v6 E2E Testing using WebdriverIO and Appium to Test On Device
33

4-
### Overview
4+
## Overview
55
Looking to integrate e2e testing a an ionic-framework application and the [sample provided by Ionic](https://github.com/ionic-team/ionic-e2e-example) in written in Angular and it is based on cordova and not capacitor so I have started this project to figure things out
66

77
- sample based on the list template provided by ionic
88
- source code is in react js
99
- tests currently work in android emulator and in the webbrowser
1010
- This still a work in progress but it is based on latest versions on Ionic and Capacitor so it shoul get on started better than the other sample
1111
- The project hasn't been cleaned up, there are still some artifacts from the original Ionic Project
12-
### IOS Quirk
12+
13+
## IOS Quirk
1314
For the application path for the IOS application, you will need to manually set that based on the specific device/emulator that are deploying to. unlike android it appears that the IOS build is directly to the device.
1415

1516
if you look at line 32 in the `wdio.ios.config.ts` you will see the path that you will need to change. To get the specific path i have run the build command with the `--verbose` flag to output the appropriate information
1617
```
1718
ionic capacitor run ios --target 1DB27F13-4EF3-4D45-A67B-88C69B53EF84 --verbose
1819
```
1920

20-
### References
21+
## Android setup
22+
23+
If you're starting from scratch, you'll need to set appium up on your system.
24+
25+
Generally, you should follow the appium docs, but here's the short version.
26+
27+
Install appium globally:
28+
29+
`npm i --location=global appium`
30+
31+
Install the Android driver:
32+
33+
`appium driver install uiautomator2`
34+
35+
Make sure you have a device created in Android Studio's Device Manager.
36+
37+
Build the app as an APK and launch it on the device in the simulator.
38+
39+
In `wdio.android.config.ts`, modify `appium:deviceName` to be your device's exact name, and change `appium:platformVersion` to your device's Android version.
40+
41+
Also ensure the `appium:app` path is correct for your system.
42+
43+
You can now run the tests:
44+
45+
'npm run ionic-e2e:run:android`
46+
47+
## References
2148
- [WebdriverIO](https://webdriver.io/)
2249
- [Appium](https://appium.io/)

0 commit comments

Comments
 (0)