Share a flow across iOS and Android
Hard120 pts~45 min
- Cross-platform
- Locator strategy
Practice app · Acme Mobile
A mobile app in a device frame. Elements expose data-accessibility-id (= aria-label) for AppiumBy.accessibilityId.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Write one login-and-open flow that runs on both platforms, branching only where they differ.
Your task
- 1Use accessibility ids for everything both platforms share (username, password, login, allow, item-n).
- 2Read the platform from the session capabilities and branch only for platform-specific details.
- 3Run the flow: log in, allow notifications, open item 12.
- 4Assert the detail title is "Item 12".
Acceptance criteria
- Item 12 is opened
- Shared accessibility id locators
- The platform is read from the session
- At least 1 assertion passes
Constraints
- The practice device runs the Android build, but it accepts iOS capabilities and iOS locator strategies (name / label = accessibility id), so write the test as you would for iOS.
Fixtures
- username
- qa@target.dev
- password
- Test@123
Appium 2 · Appium · Architecture & CI