次の方法で共有


Instrumentation.UiAutomation プロパティ

定義

フラグが UiAutomation 設定されていないインスタンスを取得します。

public virtual Android.App.UiAutomation? UiAutomation { [Android.Runtime.Register("getUiAutomation", "()Landroid/app/UiAutomation;", "GetGetUiAutomationHandler")] get; }
[<get: Android.Runtime.Register("getUiAutomation", "()Landroid/app/UiAutomation;", "GetGetUiAutomationHandler")>]
member this.UiAutomation : Android.App.UiAutomation

プロパティ値

UI オートメーション インスタンス。

属性

注釈

フラグが UiAutomation 設定されていないインスタンスを取得します。

<厳密な>注:</strong> インストルメンテーションによって公開される API では、アプリケーションの境界を越えて返された UiAutomation 作業を介して公開される API は公開されません。 たとえば、 Instrumentation#sendPointerSync(MotionEvent) ではインストルメンテーション ターゲットとは異なるアプリにイベントを挿入することはできませんが UiAutomation#injectInputEvent(android.view.InputEvent, boolean) 、現在のアプリケーションに関係なく機能します。

一般的なテスト ケースでは、 または Instrumentation API を使用UiAutomationする必要があります。 両方の API を同時に使用することは間違いではありませんが、クライアントは API の制限に注意する必要があります。

getUiAutomation(0) と同等です。 UiAutomationが異なるフラグを持つ が存在する場合は、そのインスタンスのフラグが変更され、そのフラグが返されます。

互換モード: このメソッドは、以前のバージョンを対象とする Build.VERSION_CODES#R アプリでは無効です。新しいバージョンを対象とするアプリの場合、接続に失敗した場合 UiAutomation は null が返されます。 呼び出し元は戻り値をチェックし、エラー時に再試行できます。

android.app.Instrumentation.getUiAutomation()Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象

こちらもご覧ください