Appium 2

Start and end a session

Easy30 pts~12 min
  • Sessions
  • Test lifecycle
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-start-and-end-a-session

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

Objective

Own the session lifecycle: start it, prove it is alive, and always end it.

Your task

  1. 1Let the setup create the session from the starter capabilities.
  2. 2Assert the session id is not null / empty.
  3. 3Assert the login button (accessibility id "login") is displayed.
  4. 4End the session in teardown (quit / deleteSession) even when the test fails.

Acceptance criteria

  • The session id is read and asserted
  • The login screen is shown
  • At least 2 assertions pass

Fixtures

username
qa@target.dev
password
Test@123

Appium 2 · Appium · Setup & capabilities