Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #23 from adzellman/master

Introducing missing __findViewWithAttributeInTreeOrRaise
  • Loading branch information...
commit 53cc6659418369180655c93395107416e22bb2fa 2 parents 73f0fc1 + e63e042
@dtmilano authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 AndroidViewClient/src/com/dtmilano/android/viewclient.py
View
9 AndroidViewClient/src/com/dtmilano/android/viewclient.py
@@ -1611,7 +1611,14 @@ def __findViewWithAttributeInTree(self, attr, val, root):
return v
return None
-
+
+ def __findViewWithAttributeInTreeOrRaise(self, attr, val, root):
+ view = self.__findViewWithAttributeInTree(attr, val, root)
+ if view:
+ return view
+ else:
+ raise ViewNotFoundException("Couldn't find View with %s='%s' in tree with root=%s" % (attr, val, root))
+
def __findViewWithAttributeInTreeThatMatches(self, attr, regex, root, rlist=[]):
if not self.root:
print >>sys.stderr, "ERROR: no root, did you forget to call dump()?"

0 comments on commit 53cc665

Please sign in to comment.
Something went wrong with that request. Please try again.