Switch back to native context
Hard120 pts~45 min
- Hybrid apps
- Contexts
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
Leave the web view, return to NATIVE_APP and continue with native gestures.
Your task
- 1Log in as qa@target.dev / Test@123 via the accessibility ids "username", "password" and "login".
- 2Tap "allow" on the notification permission dialog (#permission-dialog) — the app is blocked until you answer it.
- 3Open the Web tab, switch to WEBVIEW_* and assert #webview-heading reads "Web content".
- 4Switch back to NATIVE_APP.
- 5Tap the Profile tab (accessibility id "tab-profile") and assert #permission-status reads "Notifications allowed".
Acceptance criteria
- Native navigation works after leaving the web view
- NATIVE_APP is used
- At least 2 assertions pass
Fixtures
- username
- qa@target.dev
- password
- Test@123
Appium 2 · Appium · Waits & context