Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Appium struggles with multiple screens or views because it, and the underlying UiAutomator, focus on a single active window and the default display at a time. The view hierarchy dump and screenshot come from the primary display, so secondary displays and simultaneous split views fall outside its default focus. To reach another screen you must switch context, target a specific display id, or set the active application.
The confusion around "multiple screens" usually comes from mixing three different concepts. Separating them makes the limitation, and the fix, much clearer:
For hybrid apps, most "second view" problems are really context problems. List the available contexts, then switch to the webview to interact with web elements and back to native afterward:
// List all available contexts (NATIVE_APP, WEBVIEW_*)
Set<String> contexts = driver.getContextHandles();
for (String context : contexts) {
if (context.contains("WEBVIEW")) {
driver.context(context); // switch to the webview
break;
}
}
// interact with web elements here ...
driver.context("NATIVE_APP"); // switch back to native view
When the app runs on a secondary physical display, launch it against a specific display id and capture that display's hierarchy and screenshot instead of the default one:
# Launch the app on display 1 (secondary display)
adb shell am start com.example.app --display 1
adb shell screencap -d 1 -p /sdcard/screencapture1.png
adb pull /sdcard/screencapture1.png .
adb shell uiautomator dump
adb pull /sdcard/window_dump.xml
mv window_dump.xml window_dump1.uix
For iPadOS split view, set the defaultActiveApplication setting to tell Appium which app to treat as active, then switch when you need the other pane. Learn the broader tooling in Appium testing.
Multi-screen behavior often depends on the exact device, OS version, and display configuration, which is hard to reproduce on a single local emulator. With TestMu AI, you can run Appium tests on a real device cloud of 3000+ real browsers and devices, where each session isolates a real device and screen. This lets you validate context switching, webview flows, and multi-screen navigation across many device and OS combinations without maintaining a physical device lab, and complements broader mobile app testing.
Appium is not fundamentally unable to handle multiple screens or views; it defaults to a single active window and display. Once you separate screens, views, and contexts, the fixes become concrete: switch contexts for webviews, target a display id for secondary Android screens, and set the active app for iPad split view. For consistent results across devices, run these flows on a real device cloud.
Appium and the underlying UiAutomator dump only the active window's view hierarchy and capture the default display, so secondary displays and simultaneous split views are outside its default focus. You must switch context, target a specific display id, or set the active application to reach the other screen.
A screen is a physical or logical display, a view is a UI region such as a native activity or webview, and a context is either NATIVE_APP or a WEBVIEW handle. Appium switches views within an app using context switching, but physical displays need display-level commands.
Use getContextHandles() to list available contexts, then context() to switch to the webview or back to NATIVE_APP. Hybrid apps require switching to the webview context to interact with web elements and back to native for native elements.
Appium can work with only one app's elements at a time in iPadOS split view. Using the defaultActiveApplication setting, you tell Appium which app to treat as active, then switch when you need to interact with the other pane.
Historically Appium focused on the default display, but newer UiAutomator2 driver versions add support for interacting with objects across multiple displays. You can target a display by launching the app with a display id and capturing that display's hierarchy.
Run your Appium tests on a real device cloud such as TestMu AI, where each session isolates a real device and screen. This removes local emulator display quirks and lets you validate multi-screen flows across many device and OS versions.
KaneAI - Testing Assistant
World’s first AI-Native E2E testing agent.

TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance