UiAutomation.ExecuteAndWaitForEvent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes a command and waits for a specific accessibility event up to a given wait timeout.
[Android.Runtime.Register("executeAndWaitForEvent", "(Ljava/lang/Runnable;Landroid/app/UiAutomation$AccessibilityEventFilter;J)Landroid/view/accessibility/AccessibilityEvent;", "")]
public Android.Views.Accessibility.AccessibilityEvent? ExecuteAndWaitForEvent(Java.Lang.IRunnable? command, Android.App.UiAutomation.IAccessibilityEventFilter? filter, long timeoutMillis);
[<Android.Runtime.Register("executeAndWaitForEvent", "(Ljava/lang/Runnable;Landroid/app/UiAutomation$AccessibilityEventFilter;J)Landroid/view/accessibility/AccessibilityEvent;", "")>]
member this.ExecuteAndWaitForEvent : Java.Lang.IRunnable * Android.App.UiAutomation.IAccessibilityEventFilter * int64 -> Android.Views.Accessibility.AccessibilityEvent
Parameters
- command
- IRunnable
Runnable: The command to execute.
UiAutomation.AccessibilityEventFilter: Filter that recognizes the expected event.
- timeoutMillis
- Int64
long: The wait timeout in milliseconds.
Returns
- Attributes
Remarks
Executes a command and waits for a specific accessibility event up to a given wait timeout. To detect a sequence of events one can implement a filter that keeps track of seen events of the expected sequence and returns true after the last event of that sequence is received. Note: It is caller's responsibility to recycle the returned event.
Throws: IllegalStateException If the connection to the accessibility subsystem is not established.
Throws: TimeoutException If the expected event is not received within the timeout.
Android reference for android.app.UiAutomation.executeAndWaitForEvent.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.