Defines the settings to apply for the specified finding strategy of a control.

Examples

For example, it is possible to replace the default strategy of control search with the custom one:

[assembly: FindSettings(FindTermBy.Label, Strategy = typeof(CustomFindByLabelStrategy))]

Or set another scope source for a custom control:

[FindSettings(FindTermBy.Label, ScopeSource = ScopeSource.PageObject)]
public class LoginControl<TOwner> : Control<TOwner>
    where TOwner : PageObject<TOwner>
{
    [FindByLabel]
    public TextInput<_> UserName { get; private set; }

    [FindByLabel]
    public PasswordInput<_> Password { get; private set; }
}

Properties

public int

Index { get; set; }

Gets or sets the index of the control. The default value is -1, meaning that the index is not used.

public Visibility

Visibility { get; set; }

Gets or sets the visibility. The default value is Visibility.Visible.

public ScopeSource

ScopeSource { get; set; }

Gets or sets the scope source. The default value is ScopeSource.Parent.

public string

OuterXPath { get; set; }

Gets or sets the outer XPath. The default value is null, meaning that the control is searchable as descendant (using “.//” XPath) in scope source.

public Type

Strategy { get; set; }

Gets or sets the strategy type for the control search. Strategy type should implement IComponentScopeLocateStrategy. The default value is null, meaning that the default strategy of the specific FindAttribute should be used.