getting ERROR: Offending XML: during xml parsing in __parseTreeFromUiAutomatorDump method.
The xml is having some junk characters at the end which is causing the parsing to fail.
I have made a temporary fix for myself as follows.
try: start_xml_index = receivedXml.index("<") end_xml_index = receivedXml.rindex(">") except ValueError: raise ValueError("received does not contain valid XML data") self.root = parser.Parse(receivedXml[start_xml_index:end_xml_index+1]) self.views = parser.views self.viewsById = {}
getting ERROR: Offending XML: during xml parsing in __parseTreeFromUiAutomatorDump method. The xml is having some junk characters at the end which is causing the parsing to fail.
I have made a temporary fix for myself as follows.
try: start_xml_index = receivedXml.index("<") end_xml_index = receivedXml.rindex(">") except ValueError: raise ValueError("received does not contain valid XML data") self.root = parser.Parse(receivedXml[start_xml_index:end_xml_index+1]) self.views = parser.views self.viewsById = {}
Please look into this issue and fix it.
Thanks