When I put this line in my test app,
Runtime.getRuntime().exec("uiautomator dump")
, no .xml file was dumped. I am pretty sure I checked the correct location.
I tried to debug my app by putting a break point. When it reaches the break point, I adb shell
on terminal to get into the device, and then manually run uiautomator dump
from terminal, then it says killed
, no .xml file was produced either.
adb shell uiautomator dump
only produces .xml file when I killed my app, and run this command from terminal.
Is this a sort of permission or accessibility problem?
You can't use adb shell uiautomator dump
while a test is running.
You can call UiDevice.dumpWindowHierarchy(..) from inside your test instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With