Note that there are some explanatory texts on larger screens.

plurals
  1. POError passing uiautomator dump in viewclient.py
    primarykey
    data
    text
    <p>I am getting below exection when running viewclient. I am running this on Emulator using android-17 api.</p> <pre><code>viewclient = ViewClient(device, serialno) File "/Users/dpbuild/Jenkins/workspace/AndroidViewer-FeatureBranch-UIAutomation/siamang/src/dtmilano/android/viewclient.py", line 948, in __init__ self.dump() File "/Users/dpbuild/Jenkins/workspace/AndroidViewer-FeatureBranch-UIAutomation/siamang/src/dtmilano/android/viewclient.py", line 1478, in dump self.setViewsFromUiAutomatorDump(received) File "/Users/dpbuild/Jenkins/workspace/AndroidViewer-FeatureBranch-UIAutomation/siamang/src/dtmilano/android/viewclient.py", line 1251, in setViewsFromUiAutomatorDump self.__parseTreeFromUiAutomatorDump(received) File "/Users/dpbuild/Jenkins/workspace/AndroidViewer-FeatureBranch-UIAutomation/siamang/src/dtmilano/android/viewclient.py", line 1405, in _ViewClient__parseTreeFromUiAutomatorDump self.root = parser.Parse(receivedXml) File "/Users/dpbuild/Jenkins/workspace/AndroidViewer-FeatureBranch-UIAutomation/siamang/src/dtmilano/android/viewclient.py", line 832, in Parse parserStatus = parser.Parse(uiautomatorxml, 1) #@UnusedVariable File "/Tools/android-sdk-macosx/tools/lib/jython.jar/Lib/xml/parsers/expat.py", line 212, in Parse xml.parsers.expat.ExpatError: XML document structures must start and end within the same entity. </code></pre> <p><strong>Looking at the uiautomatorxml, by adding a print statement as below:</strong></p> <pre><code>def Parse(self, uiautomatorxml): # Create an Expat parser parser = xml.parsers.expat.ParserCreate() # Set the Expat event handlers to our methods parser.StartElementHandler = self.StartElement parser.EndElementHandler = self.EndElement parser.CharacterDataHandler = self.CharacterData # Parse the XML File **print "DEBUG: " + uiautomatorxml** parserStatus = parser.Parse(uiautomatorxml, 1) #@UnusedVariable return self.root </code></pre> <p>I got,</p> <p>DEBUG: (XML file starts in a normal fashion, below is tail end of the log that was printed)</p> <p><code>&lt;node index="1" text="" class="android.view.View" package="com.android.launcher" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="true" long-clickable="false" password="false" selected="false" bounds="[0,25][800,1232]"&gt;&lt;node index="2" text="" class="android.view.View" package="com.android.launcher" content-desc="Home screen 3" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focus</code></p> <p>130515 19:41:07.014:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception</p> <p>Clearly, XML is not fully formed. I was wondering if you had any ideas on why this could be happening and how to resolve this.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload