Continuous Test Orchestration And Execution Platform Online

Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.

Why is Appium not detecting elements on the page?

The UiAutomator Viewer dumps the active window's view hierarchy, and the screenshot is taken from the default display. If you want to use UiAutomator Viewer to examine a screenshot of your app, you can create both files programmatically and provide them to UiAutomator Viewer:


adb shell am start com.google.android.calendar --display 0 
adb shell screencap -d 0 -p /sdcard/screencapture0.png
adb pull /sdcard/screencapture0.png . 
adb shell uiautomator dump 
adb pull /sdcard/window_dump.xml 
mv window_dump.xml window_dump0.uix

By selecting "Open" in the UiAutomator Viewer and selecting screencapture0.png and window_dump0.uix, you can open an app on the secondary display.

By opening an app on the secondary display, the focus moves to the other display, and you can reinvoke the same commands to get the two files:


adb shell am start com.google.android.calendar --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
LambdaTest

Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.

Start Free Testing
LambdaTest

Earn resume-worthy Selenium certifications that help you land a top job.

Learn More
LambdaTest

Test your web or mobile apps

Test orchestration and execution cloud of 3000+ browsers and OS

Support

24/7 support

Security

Enterprise grade security

Cloud

Fastest test execution cloud