Specifies the waiting for the element. By default occurs after the click.

public class SamplePage : Page<_>
{
    [WaitForElement(WaitBy.Class, "busy-indicator", Until.VisibleAndHidden)]
    public Button<_> Refresh { get; private set; }
}

The example after the click on Refresh button waits for element with class “busy-indicator” to become visible and then waits until it will become hidden.

Parameters

WaitBy

waitBy

The kind of the element selector to wait for.

string

selector

The selector.

Until

until = Until.MissingOrHidden

The waiting condition. The default is MissingOrHidden.

TriggerEvents

on = TriggerEvents.AfterClick

The trigger events. The default is AfterClick.

TriggerPriority

priority = TriggerPriority.Medium

The priority. The default is Medium.

Properties

public ScopeSource

ScopeSource { get; set; }

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

public bool

ThrowOnPresenceFailure { get; set; }

Gets or sets a value indicating whether to throw the exception on the presence (exists or visible) failure. The default value is true.

public bool

ThrowOnAbsenceFailure { get; set; }

Gets or sets a value indicating whether to throw the exception on the absence (missing or hidden) failure. The default value is true.

public double

PresenceTimeout { get; set; }

Gets or sets the presence (exists or visible) timeout in seconds. The default value is taken from AtataContext.Current.RetryTimeout.TotalSeconds.

public double

AbsenceTimeout { get; set; }

Gets or sets the absence (missing or hidden) timeout in seconds. The default value is taken from AtataContext.Current.RetryTimeout.TotalSeconds.

public double

RetryInterval { get; set; }

Gets or sets the retry interval. The default value is taken from AtataContext.Current.RetryInterval.TotalSeconds.

WaitBy

The enumeration that specifies the kind of the element selector for the waiting.

Value Description
Id Uses the id selector kind.
Name Uses the name selector kind.
Class Uses the class selector kind.
Css Uses the CSS selector kind.
XPath Uses the XPath selector kind.