diff options
Diffstat (limited to 'src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java')
-rw-r--r-- | src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java b/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java index 8b81485..5e55148 100644 --- a/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java +++ b/src/com/google/android/droiddriver/uiautomation/UiAutomationElement.java @@ -85,6 +85,11 @@ public class UiAutomationElement extends BaseUiElement { put(attribs, Attribute.LONG_CLICKABLE, node.isLongClickable()); put(attribs, Attribute.PASSWORD, node.isPassword()); put(attribs, Attribute.SCROLLABLE, node.isScrollable()); + if (node.getTextSelectionStart() >= 0 + && node.getTextSelectionStart() != node.getTextSelectionEnd()) { + attribs.put(Attribute.SELECTION_START, node.getTextSelectionStart()); + attribs.put(Attribute.SELECTION_END, node.getTextSelectionEnd()); + } put(attribs, Attribute.SELECTED, node.isSelected()); put(attribs, Attribute.BOUNDS, getBounds(node)); attributes = ImmutableMap.copyOf(attribs); |