Table of Contents

Method RunTestControlAction

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

RunTestControlAction<T>(string, Action<T>?)

Schedules an action to be performed on a test control of the specified type after setting focus and processing pending events.

public static void RunTestControlAction<T>(string name, Action<T>? action) where T : AbstractControl

Parameters

name string

The name of the action to be logged for diagnostic purposes.

action Action<T>

The action to perform on the retrieved control. If null, no action is performed.

Type Parameters

T

The type of control to retrieve and operate on. Must inherit from AbstractControl.

Remarks

This method retrieves a test instance of the specified control type and schedules the provided action to run on it during the application's idle time. The control is focused before the action is invoked. If the control cannot be found, the method logs a message and does not invoke the action.