Method GetControlForTests
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
Tthat is visible and not marked as hidden from tests; otherwise, null if no such control is found.
Type Parameters
TThe 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.