Class
HtmlElementContainer

Base class for containers of HTML elements in the Project.cs file

Definition

Constructors

HtmlElementContainer(Find)

Initializes a new HtmlElementContainer object.

Declaration

cs-api-definition
public HtmlElementContainer(Find find)

Parameters

find

Find

The Find object use when searching for this element in the DOM tree.

Properties

Find

Gets the Find object scoped to this container.

Declaration

cs-api-definition
public Find Find { get; }

Property Value

Find

OwnerBrowser

The owner browser of this container.

Declaration

cs-api-definition
public Browser OwnerBrowser { get; }

Property Value

Browser

Methods

Get(HtmlFindExpression)

Find a matching element in the DOM tree. Waits the default amount of time for the element to exist.

Declaration

cs-api-definition
public override Element Get(HtmlFindExpression expr)

Parameters

expr

HtmlFindExpression

The HtmlFindExpression that defines how to find the right element.

Returns

Element

An Element or null if no matching element found.

Overrides ElementContainer<Element, HtmlFindExpression>.Get(HtmlFindExpression)

Get<TControl>(HtmlFindExpression)

Find a matching element in the DOM tree. Waits the default amount of time for the element to exist.

Declaration

cs-api-definition
public TControl Get<TControl>(HtmlFindExpression expr) where TControl : Control, new()

Parameters

expr

HtmlFindExpression

The HtmlFindExpression that defines how to find the right element.

Returns

TControl

An element of type TControl or null if no matching element found.

Get<TControl>(HtmlFindExpression, bool, int)

Find a matching element in the DOM tree.

Declaration

cs-api-definition
public TControl Get<TControl>(HtmlFindExpression expr, bool waitOnElement, int timeout) where TControl : Control, new()

Parameters

expr

HtmlFindExpression

The HtmlFindExpression that defines how to find the right element.

waitOnElement

bool

Whether or not to wait for the element to exist.

timeout

int

The amount of time to wait for the element to exist.

Returns

TControl

An element of type TControl or null if no matching element found.

Get<TControl>(params string[])

Find a matching element in the DOM tree. Waits the default amount of time for the element to exist.

Declaration

cs-api-definition
public TControl Get<TControl>(params string[] clauses) where TControl : Control, new()

Parameters

clauses

string[]

An array of HtmlFindExpression strings to use to find a matching element in the DOM tree.

Returns

TControl

An element of type TControl or null if no matching element found.

GetElement(HtmlFindExpression, bool, int)

Find a matching element in the DOM tree.

Declaration

cs-api-definition
protected override Element GetElement(HtmlFindExpression expr, bool waitOnElement, int timeout)

Parameters

expr

HtmlFindExpression

The HtmlFindExpression that defines how to find the right element.

waitOnElement

bool

Whether or not to wait for the element to exist.

timeout

int

The amount of time to wait for the element to exist.

Returns

Element

An Element or null if no matching element found.

Overrides ElementContainer<Element, HtmlFindExpression>.GetElement(HtmlFindExpression, bool, int)