Appium 2

Apply the Page Object Model on mobile

Hard120 pts~45 min
  • Page Object Model
  • Maintainability
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-apply-the-page-object-model-on-mobile

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

Objective

Move locators and actions into screen objects so the test reads like a user journey.

Your task

  1. 1Create LoginScreen (login(user, password)), InboxScreen (allowNotifications(), openItem(n)) and ItemScreen (title()).
  2. 2Keep every locator inside its screen class, using accessibility ids.
  3. 3In the test: log in, allow notifications, open item 11.
  4. 4Assert ItemScreen.title() is "Item 11" — assertions stay in the test.

Acceptance criteria

  • Item 11 is opened
  • Screen objects are used
  • At least 1 assertion passes

Fixtures

username
qa@target.dev
password
Test@123

Appium 2 · Appium · Architecture & CI