Appium 2

Locate by accessibility id

Easy30 pts~12 min
  • Locators
  • Accessibility id
Practice app · Acme Mobile

A mobile app in a device frame. Elements expose data-accessibility-id (= aria-label) for AppiumBy.accessibilityId.

Test URL
/lab/appium-locate-by-accessibility-id

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Log in and answer the permission dialog using only accessibility ids — the most stable cross-platform locator.

Your task

  1. 1Log in as qa@target.dev / Test@123 via the accessibility ids "username", "password" and "login".
  2. 2Tap "allow" on the notification permission dialog (#permission-dialog) — the app is blocked until you answer it.
  3. 3Assert the inbox is displayed and the dialog is gone.

Acceptance criteria

  • Login succeeds and the dialog is answered
  • Only accessibility id locators are used
  • At least 1 assertion passes

Constraints

  • Do not use XPath.

Fixtures

username
qa@target.dev
password
Test@123

Appium 2 · Appium · Locators & elements