Search in sources :

Example 86 with AccessibilityNodeInfo

use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by DirtyUnicorns.

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();
}
Also used : AccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)

Example 87 with AccessibilityNodeInfo

use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by DirtyUnicorns.

the class UiObject method isFocusable.

/**
     * Check if the UI element's <code>focusable</code> property is currently true.
     *
     * @return true if it is else false
     * @throws UiObjectNotFoundException
     * @since API Level 16
     */
public boolean isFocusable() throws UiObjectNotFoundException {
    Tracer.trace();
    AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
    if (node == null) {
        throw new UiObjectNotFoundException(getSelector().toString());
    }
    return node.isFocusable();
}
Also used : AccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)

Example 88 with AccessibilityNodeInfo

use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by DirtyUnicorns.

the class UiObject method getChildCount.

/**
     * Counts the child views immediately under the present UiObject.
     *
     * @return the count of child views.
     * @throws UiObjectNotFoundException
     * @since API Level 16
     */
public int getChildCount() throws UiObjectNotFoundException {
    Tracer.trace();
    AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
    if (node == null) {
        throw new UiObjectNotFoundException(getSelector().toString());
    }
    return node.getChildCount();
}
Also used : AccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)

Example 89 with AccessibilityNodeInfo

use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by DirtyUnicorns.

the class UiObject method isScrollable.

/**
     * Check if the view's <code>scrollable</code> property is currently true
     *
     * @return true if it is else false
     * @throws UiObjectNotFoundException
     * @since API Level 16
     */
public boolean isScrollable() throws UiObjectNotFoundException {
    Tracer.trace();
    AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
    if (node == null) {
        throw new UiObjectNotFoundException(getSelector().toString());
    }
    return node.isScrollable();
}
Also used : AccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)

Example 90 with AccessibilityNodeInfo

use of android.view.accessibility.AccessibilityNodeInfo in project android_frameworks_base by DirtyUnicorns.

the class UiObject method getVisibleBounds.

/**
     * Returns the visible bounds of the view.
     *
     * If a portion of the view is visible, only the bounds of the visible portion are
     * reported.
     *
     * @return Rect
     * @throws UiObjectNotFoundException
     * @see #getBounds()
     * @since API Level 17
     */
public Rect getVisibleBounds() throws UiObjectNotFoundException {
    Tracer.trace();
    AccessibilityNodeInfo node = findAccessibilityNodeInfo(mConfig.getWaitForSelectorTimeout());
    if (node == null) {
        throw new UiObjectNotFoundException(getSelector().toString());
    }
    return getVisibleBounds(node);
}
Also used : AccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)

Aggregations

AccessibilityNodeInfo (android.view.accessibility.AccessibilityNodeInfo)310 Point (android.graphics.Point)84 Rect (android.graphics.Rect)84 AccessibilityNodeProvider (android.view.accessibility.AccessibilityNodeProvider)45 RemoteException (android.os.RemoteException)30 IAccessibilityInteractionConnectionCallback (android.view.accessibility.IAccessibilityInteractionConnectionCallback)30 SomeArgs (com.android.internal.os.SomeArgs)30 Region (android.graphics.Region)25 Paint (android.graphics.Paint)19 View (android.view.View)12 ViewRootImpl (android.view.ViewRootImpl)11 RemoteView (android.widget.RemoteViews.RemoteView)11 Display (android.view.Display)10 File (java.io.File)10 LinkedList (java.util.LinkedList)7 ArrayList (java.util.ArrayList)6 List (java.util.List)6 UiAutomation (android.app.UiAutomation)5 InputFilter (android.text.InputFilter)5 TextPaint (android.text.TextPaint)5