Specifies the default finding strategy of a control. Can be applied to the control class and assembly.

Examples

For example, it is possible to set the default finding of the Input control as by name, and for inputs whose parent is TableRow by column header:

[assembly: ControlFinding(FindTermBy.Name, ControlType = typeof(Input<,>))]
[assembly: ControlFinding(FindTermBy.ColumnHeader, ControlType = typeof(Input<,>), ParentComponentType = typeof(TableRow<>))]

Or set the finding by the label for a custom control:

[ControlFinding(FindTermBy.Label)]
public class CustomControl<TOwner> : Control<TOwner>
    where TOwner : PageObject<TOwner>
{
}

Properties

public Type

ControlType { get; set; }

Gets or sets the type of the control (e.g.: typeof(Link<>), typeof(EditableField<,>)).

public Type

ParentComponentType { get; set; }

Gets or sets the type of the parent component.