I am using a banking app (Android app). The app doesn't allow screenshots to be taken. When I open UI Automator Viewer and try to take a screenshot, I am getting the following error:
'Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist! Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!'
I am using Appium + Selenium for automation.
Question:
Is there any way to programmatically activate the screenshot feature in the app?
Is there a way to find the root object in the application screen and iterate through all the child objects recursively and print their attributes/properties (as PageObjectModel)?
Please help me. Thanks.
Figured out the work-around with the following steps:
driver.getPageSource()
to get the page source as stringLet me know if anyone have a better idea. Thanks