Represents the base class for the controls.

Inherited from UIComponent.

Inherited class supports [ControlDefinition], [ControlFinding], [FindSettings], [TermFindSettings], [Format] and [Culture] settings attributes.

Syntax

[ControlDefinition("*", ComponentTypeName = "control")]
public class Control<TOwner> : UIComponent<TOwner>, IControl<TOwner>
    where TOwner : PageObject<TOwner>

Properties

public DataProvider<bool, TOwner>

IsEnabled { get; }

Gets the DataProvider instance for the value indicating whether the control is enabled.

Control.IsEnabled.Should.BeTrue();
bool isEnabled = Control.IsEnabled;

Methods

public TOwner

Click()

Clicks the control. Also executes TriggerEvents.BeforeClick and TriggerEvents.AfterClick triggers.

public TOwner

Hover()

Hovers the control. Also executes TriggerEvents.BeforeHover and TriggerEvents.AfterHover triggers.

public TOwner

Focus()

Focuses the control. Also executes TriggerEvents.BeforeFocus and TriggerEvents.AfterFocus triggers.

public TOwner

DoubleClick()

Double-clicks the control. Also executes TriggerEvents.BeforeClick and TriggerEvents.AfterClick triggers.

public TOwner

RightClick()

Right-clicks the control. Also executes TriggerEvents.BeforeClick and TriggerEvents.AfterClick triggers.

public TOwner

DragAndDropTo(Func<TOwner, Control<TOwner>> targetSelector)

Drags and drops the control to the target control returned by targetSelector. By default uses DragAndDropUsingActionsAttribute. Also executes TriggerEvents.BeforeClick and TriggerEvents.AfterClick triggers.

public TOwner

DragAndDropTo(Control<TOwner> target)

Drags and drops the control to the target control. By default uses DragAndDropUsingActionsAttribute. Also executes TriggerEvents.BeforeClick and TriggerEvents.AfterClick triggers.

public TOwner

DragAndDropToOffset(int offsetX, int offsetY)

Drags and drops the control to the specified offset. Also executes TriggerEvents.BeforeClick and TriggerEvents.AfterClick triggers.

public TOwner

ScrollTo()

Scrolls to the control. By default uses ScrollUsingMoveToElementAttribute behavior. Also executes TriggerEvents.BeforeScroll and TriggerEvents.AfterScroll triggers.