Full-day workshop teaching mobile test automation using WebdriverIO and Appium. This repo also supports a half-day (4-hour) format, see Half-day format below.
section-XX-name/
├── exercises/ # Starter files, participants work here
└── answers/ # Reference solutions (visible from the next section's branch)
config/ # WebdriverIO configuration files
tests/ # Shared helpers and page objects
apps/ # Demo app binaries (see apps/README.md)
Each section lives on its own branch. Answers for a section are revealed in the next branch, so participants cannot accidentally see solutions while working.
Before the workshop, make sure you have the following installed on your machine. A separate setup guide has been shared with you, complete it at home to save time on the day.
- Node.js 24 LTS (
nvm useif you have nvm) - Android Studio + at least one AVD configured (all platforms)
- Xcode + iOS Simulator (Mac only)
- Java 11+ with
JAVA_HOMEset
# Clone the project
git clone https://github.com/webdriverio/workshop-mobile-automation-with-appium.git
# Open the project directory
cd workshop-mobile-automation-with-appium
# Install the dependencies
npm install
# checkout the correct branch
git checkout section/01-setupThe exercises, branches, and answers/ folders below are unchanged for a half-day run, the facilitator just skips specific exercises live and points participants to them as take-home/self-study. The matching slide deck variant is on the half-day branch of the presentation repo (or your local copy).
| Section | Live | Take-home |
|---|---|---|
| 1 Setup | Quick verification only (env install and demo app download are pre-work) | - |
| 2 Core concepts | Exercise 01 | Exercise 02 (contexts and app switching) |
| 3 Locators | Exercise 01, Exercise 02 | Exercise 03 (iOS XPath performance, iOS-only) |
| 4 Gestures | Exercise 01, Exercise 03, Exercise 04 | Exercise 02 (driver.action(), shown live as a comparison, coded at home) |
| 5 Best practices | Exercise 01 | Exercise 02 (data management) |
| 6 Bonus: hybrid apps | Concept intro only (~5 min, no live exercise) | Exercise 01 (full hands-on context matching) |
| 7 Final thoughts | Recap and Q&A, tightened | - |
Participants still check out the same section branches; the take-home exercises are just not run live, so they can complete them later using the same branch and answers/ reference.
- Section 1: Setup Check
- Section 2: Appium Core Concepts
- Section 3: Locating and Interacting with Elements
- Section 4: Working with Gestures
- Section 5: Debugging and Best Practices
- Section 6: Mobile Web and Hybrid Apps (Bonus)
- Section 7: Final Thoughts
Goal: Verify your environment is working before the workshop begins.
Open ./section-01-setup/exercises/exercise-01-first-test.md and follow the steps.
Next: when your test is green, move to Section 2:
git checkout section/02-core-conceptsGoal: Understand how Appium works under the hood so nothing feels like magic.
Open ./section-02-core-concepts/exercises/exercise-01-session.md and follow the steps.
Open ./section-02-core-concepts/exercises/exercise-02-context.md and follow the steps.
Important
The demo app must be in apps/ before running. See apps/README.md for download instructions.
Next: when you are done, move to Section 3:
git checkout section/03-locatorsGoal: Use multiple selector strategies and understand when to use each one.
Note
The reference answers for Section 2 are in section-02-core-concepts/answers/. Review them together before starting the exercises below.
Important
From this section onwards you need two emulators or simulators running at the same time. One for your tests, one for Appium Inspector. Start a second device before opening Inspector.
Launch Appium Inspector on your second device: npm run appium-inspector
Open ./section-03-locators/exercises/exercise-01-selectors.md and follow the steps.
Open ./section-03-locators/exercises/exercise-02-platform-selectors.md and follow the steps.
Open ./section-03-locators/exercises/exercise-03-xpath.md and follow the steps.
Next: when you are done, move to Section 3:
git checkout section/04-gesturesGoal: Build gestures from scratch using the W3C Actions protocol, then use the WebdriverIO high-level gesture API to scroll, swipe, and drag elements.
Note
The reference answers for Section 3 are in section-03-locators/answers/. Review them together before starting the exercises below.
Open ./section-04-gestures/exercises/exercise-01-perform-actions.md and follow the steps.
Open ./section-04-gestures/exercises/exercise-02-driver-action.md and follow the steps.
Open ./section-04-gestures/exercises/exercise-03-swipe.md and follow the steps.
Open ./section-04-gestures/exercises/exercise-04-drag-and-drop.md and follow the steps.
Next: when you are done, move to Section 5:
git checkout section/05-best-practicesGoal: Handle flaky tests, apply the Page Object Model, and understand CI considerations.
Note
The reference answers for Section 4 are in section-04-gestures/answers/. Review them together before starting the exercises below.
Open ./section-05-best-practices/exercises/exercise-01-helpers.md and follow the steps.
Open ./section-05-best-practices/exercises/exercise-02-data-management.md and follow the steps.
Next: when you are done, move to Section 6 (bonus):
git checkout section/06-bonus-hybridGoal: Test Chrome on Android and switch between native and webview contexts in a hybrid app.
Note
The reference answers for Section 5 are in section-05-best-practices/answers/. Review them together before starting the exercises below.
Open ./section-06-bonus-hybrid/exercises/exercise-01-hybrid.md and follow the steps.
Next: when you are done, move to the final thoughts:
git checkout section/07-final-thoughtsRecap, next steps, and Q&A.
Note
The reference answers for Section 6 are in section-06-bonus-hybrid/answers/. Review them together as a group.
Tip
Run npx appium doctor --android or npx appium doctor --ios to identify missing dependencies automatically.
- Connection refused: your emulator or simulator is not running. Start it, then retry.
- Device not found: run
npx appium devicesto see what is available, then updateappium:deviceNamein the config file. - Session start failed: run
npx appium driver list --installedand confirmuiautomator2and/orxcuitestare listed. - Branch not found: run
git fetch origin, then retry the checkout. - Local changes would be overwritten: run
git stash, checkout the branch, thengit stash popif you want your changes back.