commit | 6b8d14ca5b3c2cbc066133da2e66658fb81f206e | [log] [tgz] |
---|---|---|
author | Adam Momtaz <amomtaz@google.com> | Thu Feb 21 10:34:12 2013 -0800 |
committer | Adam Momtaz <amomtaz@google.com> | Thu Feb 21 10:37:18 2013 -0800 |
tree | 0305e76babe0ff0a1418f9582aeba550c1e2c2b0 | |
parent | 0d3e425526a214d355e87b0c90f1b85c8aefe35a [diff] |
UiSelector support for resource-id wasn't quite right Change-Id: If97edcbdfc9593977860c9ee1b086adfdf0a49c3
diff --git a/uiautomator/library/core-src/com/android/uiautomator/core/UiSelector.java b/uiautomator/library/core-src/com/android/uiautomator/core/UiSelector.java index d16aff7..c1ddb32 100644 --- a/uiautomator/library/core-src/com/android/uiautomator/core/UiSelector.java +++ b/uiautomator/library/core-src/com/android/uiautomator/core/UiSelector.java
@@ -772,7 +772,8 @@ } break; case UiSelector.SELECTOR_RESOURCE_ID: - if (node.getViewIdResourceName() != getString(criterion)) { + s = node.getViewIdResourceName(); + if (s == null || !s.toString().contentEquals(getString(criterion))) { return false; } break;