diff options
author | Kevin Jin <kjin@google.com> | 2013-03-18 15:27:20 -0700 |
---|---|---|
committer | Kevin Jin <kjin@google.com> | 2013-03-18 16:35:21 -0700 |
commit | 7b2b76255593f0ecfbe2d7f996712fefb391dfed (patch) | |
tree | 9abde812eea05e30adefbd9a98ed5fe1f277383b /src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java | |
parent | acde362144222864329ad64d7e746b717103c806 (diff) | |
download | droiddriver-7b2b76255593f0ecfbe2d7f996712fefb391dfed.tar.gz |
support xpath
Build a virtual DOM tree that maps UiAutomationElement or
InstrumentationElement tree, respectively. Then use XPath
on the DOM tree.
TODO: filter insignificant nodes to make use of uiautomatorviewer
TODO: add all attrs
Change-Id: I2f9e289b77350f1e920a492ce438ebfd67882058
Diffstat (limited to 'src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java')
-rw-r--r-- | src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java b/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java index 863da9f..898a6a0 100644 --- a/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java +++ b/src/com/google/android/droiddriver/uiautomation/UiAutomationDriver.java @@ -23,6 +23,7 @@ import android.view.accessibility.AccessibilityNodeInfo; import com.google.android.droiddriver.UiElement; import com.google.android.droiddriver.base.AbstractDroidDriver; import com.google.android.droiddriver.exceptions.ElementNotFoundException; +import com.google.android.droiddriver.util.Logs; /** * Implementation of a DroidDriver that is driven via the accessibility layer. @@ -37,7 +38,7 @@ public class UiAutomationDriver extends AbstractDroidDriver { @Override public UiElement getRootElement() { - return context.getUiElement(getRootNode()); + return Logs.wrap(UiElement.class, context.getUiElement(getRootNode())); } private AccessibilityNodeInfo getRootNode() { |