Appium 2

Locate with an iOS predicate

Medium70 pts~25 min
  • iOS predicates
  • Locators
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-with-an-ios-predicate

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

Objective

Find an inbox item with an iOS predicate string and open it.

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. 3Locate item 3 with the predicate name == 'item-3' and tap it.
  4. 4Assert the detail title is "Item 3".

Acceptance criteria

  • Item 3 is opened
  • An iOS predicate string is used
  • 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 · Locators & elements