use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by ResurrectionRemix.
the class UiObject method isSelected.
/**
* Checks if the UI element's <code>selected</code> property is currently true.
*
* @return true if it is else false
* @throws UiObjectNotFoundException
* @since API Level 16
*/
public boolean isSelected() throws UiObjectNotFoundException {
Tracer.trace();
AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
if (node == null) {
throw new UiObjectNotFoundException(getSelector().toString());
}
return node.isSelected();
}
use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by ResurrectionRemix.
the class UiObject method isClickable.
/**
* Checks if the UI element's <code>clickable</code> property is currently true.
*
* @return true if it is else false
* @throws UiObjectNotFoundException
* @since API Level 16
*/
public boolean isClickable() throws UiObjectNotFoundException {
Tracer.trace();
AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
if (node == null) {
throw new UiObjectNotFoundException(getSelector().toString());
}
return node.isClickable();
}
use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by ResurrectionRemix.
the class UiObject method getBounds.
/**
* Returns the view's <code>bounds</code> property. See {@link #getVisibleBounds()}
*
* @return Rect
* @throws UiObjectNotFoundException
* @since API Level 16
*/
public Rect getBounds() throws UiObjectNotFoundException {
Tracer.trace();
AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
if (node == null) {
throw new UiObjectNotFoundException(getSelector().toString());
}
Rect nodeRect = new Rect();
node.getBoundsInScreen(nodeRect);
return nodeRect;
}
use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by ResurrectionRemix.
the class UiObject method getText.
/**
* Reads the <code>text</code> property of the UI element
*
* @return text value of the current node represented by this UiObject
* @throws UiObjectNotFoundException if no match could be found
* @since API Level 16
*/
public String getText() throws UiObjectNotFoundException {
Tracer.trace();
AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
if (node == null) {
throw new UiObjectNotFoundException(getSelector().toString());
}
String retVal = safeStringReturn(node.getText());
Log.d(LOG_TAG, String.format("getText() = %s", retVal));
return retVal;
}
use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by ResurrectionRemix.
the class UiObject method isLongClickable.
/**
* Check if the view's <code>long-clickable</code> property is currently true
*
* @return true if it is else false
* @throws UiObjectNotFoundException
* @since API Level 16
*/
public boolean isLongClickable() throws UiObjectNotFoundException {
Tracer.trace();
AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
if (node == null) {
throw new UiObjectNotFoundException(getSelector().toString());
}
return node.isLongClickable();
}
Aggregations