MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / setViews

Method setViews

src/com/dtmilano/android/viewclient.py:3160–3174  ·  view source on GitHub ↗

Sets L{self.views} to the received value splitting it into lines. @type received: str @param received: the string received from the I{View Server}

(self, received, windowId=None)

Source from the content-addressed store, hash-verified

3158 return response == PARCEL_TRUE
3159
3160 def setViews(self, received, windowId=None):
3161 """
3162 Sets L{self.views} to the received value splitting it into lines.
3163
3164 @type received: str
3165 @param received: the string received from the I{View Server}
3166 """
3167
3168 if not received or received == "":
3169 raise ValueError("received is empty")
3170 self.views = []
3171 ''' The list of Views represented as C{str} obtained after splitting it into lines after being received from the server. Done by L{self.setViews()}. '''
3172 self.__parseTree(received.split("\n"), windowId)
3173 if DEBUG:
3174 print("there are %d views in this dump" % len(self.views), file=sys.stderr)
3175
3176 def setViewsFromUiAutomatorDump(self, received):
3177 """

Callers 2

dumpMethod · 0.95
__mockTreeMethod · 0.95

Calls 1

__parseTreeMethod · 0.95

Tested by 1

__mockTreeMethod · 0.76