Capturing screen in motion using UI Automator throws an "Error obtaining UI hierarchy" error

Hi All,

I am using Appium with Java+ TestNG to test an Android App.

I am tring to capture a dynamic screen using UI Automator - A descending countdown clock.

unfortunatelly i am getting an error : “Error obtaining UI hierarchy Reason: Error while obtaining UI hierarchy XML file: Remote object doesn’t exist!”

  1. Can anyone tell me if there is a way to capture a dynamic screen ? how will i do it?
  2. if where is a way, will i be able to get acess to elements during descending countdown clock?

thanks in advace ,


  1. make sure that Android app screen is not configured to prohibit take screenshot
  2. check debug mode enabled
  3. check you can capture it with native “uiautomatorviewer”