Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Introducing missing __findViewWithAttributeInTreeOrRaise #23

merged 1 commit into from

2 participants


Introducing missing __findViewWithAttributeInTreeOrRaise in order to make findViewWithContentDescriptionOrRaise work.

@dtmilano dtmilano merged commit 53cc665 into dtmilano:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 28, 2013
  1. @adzellman

    Introducing missing __findViewWithAttributeInTreeOrRaise in order to …

    adzellman authored
    …make findViewWithContentDescriptionOrRaise work.
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 1 deletion.
  1. +8 −1 AndroidViewClient/src/com/dtmilano/android/
9 AndroidViewClient/src/com/dtmilano/android/
@@ -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()?"
Something went wrong with that request. Please try again.