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.
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
- 1Create LoginScreen (login(user, password)), InboxScreen (allowNotifications(), openItem(n)) and ItemScreen (title()).
- 2Keep every locator inside its screen class, using accessibility ids.
- 3In the test: log in, allow notifications, open item 11.
- 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