StackOverflow friends,
I'd like to find a programmatical way to dump a selected element in Appium Python.
The current solution from StackOverflow is to use
element.get_attribute('outerHTML')
but this only works in WebView Context. Nowadays most apps run in NativeApp context, therefore, the 'outerHTML' isn't available.
I saw Appium Inspector can display the selected element's detail,
I'd like to mimic this in Python, and print out to terminal.
I could have dumped the whole page using
driver.page_source
but I'd like to use the element-only dump to assert that I have selected the correct element.
By the way, I am testing on Android 13 device.
Thank you