Appium 2

Read element attributes

Easy30 pts~12 min
  • Attributes
  • Element state
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-read-element-attributes

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

Objective

Read and assert element attributes and state instead of only tapping elements.

Your task

  1. 1On the login screen assert the "login" button is displayed and enabled, and read its content-desc / name attribute ("login").
  2. 2Log in as qa@target.dev / Test@123 via the accessibility ids "username", "password" and "login".
  3. 3Tap "allow" on the notification permission dialog (#permission-dialog) — the app is blocked until you answer it.
  4. 4Open item 4 (accessibility id "item-4") and assert the detail title text is "Item 4".

Acceptance criteria

  • Attributes are read with getAttribute
  • Item 4 is opened
  • At least 3 assertions pass

Fixtures

username
qa@target.dev
password
Test@123

Appium 2 · Appium · Locators & elements