Skip to content

Commit

Permalink
refactor: use search instead of match
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafaaael committed Oct 20, 2024
1 parent 9be41ba commit 34d2599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/dtmilano/android/viewclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3955,7 +3955,7 @@ def __findViewWithAttributeInTreeThatMatches(self, attr, regex, root, rlist=[]):
if DEBUG: print("__findViewWithAttributeInTreeThatMatches: checking if root=%s attr=%s matches %s" % (
root.__smallStr__(), attr, regex), file=sys.stderr)

if root and attr in root.map and regex.match(root.map[attr]):
if root and attr in root.map and regex.search(root.map[attr]):
if DEBUG: print("__findViewWithAttributeInTreeThatMatches: FOUND: %s" % root.__smallStr__(),
file=sys.stderr)
return root
Expand All @@ -3981,7 +3981,7 @@ def __findViewsWithAttributeInTreeThatMatches(self, attr, regex, root, rlist=[])
print("__findViewsWithAttributeInTreeThatMatches: checking if root=%s attr=%s matches %s" % (
root.__smallStr__(), attr, regex), file=sys.stderr)

if root and attr in root.map and regex.match(root.map[attr]):
if root and attr in root.map and regex.search(root.map[attr]):
if DEBUG:
print("__findViewsWithAttributeInTreeThatMatches: FOUND: %s" % root.__smallStr__(), file=sys.stderr)
matchingViews.append(root)
Expand Down

0 comments on commit 34d2599

Please sign in to comment.