Table of Contents

Method GetControlForTests

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

GetControlForTests<T>()

Retrieves the first visible control of type T that is not marked to be hidden from tests.

public static T? GetControlForTests<T>() where T : AbstractControl

Returns

T

A control of type T that is visible and not marked as hidden from tests; otherwise, null if no such control is found.

Type Parameters

T

The type of control to search for. Must inherit from AbstractControl.

Remarks

This method is intended for use in test scenarios to locate a control that is not explicitly excluded from testing by the "HideFromTests" attribute.