Class
ElementContainer<TElement, TFindExpression>

Base class for element containers (Page, Region, SilverlightApp, etc.) in Project.cs file

Definition

Namespace:ArtOfTest.WebAii.TestTemplates

Assembly:ArtOfTest.WebAii.dll

Type Parameters:

TElement

The base element type contained; e.g. Element, FrameworkElement

TFindExpression

The type of FindExpression used; e.g. HtmlFindExpression, XamlFindExpression

Syntax:

cs-api-definition
public abstract class ElementContainer<TElement, TFindExpression> where TFindExpression : class, IFindExpression

Inheritance: objectElementContainer<TElement, TFindExpression>

Derived Classes: DesktopElementContainerHtmlElementContainerXamlElementContainer

Constructors

ElementContainer()

Declaration

cs-api-definition
protected ElementContainer()

Methods

Get(TFindExpression)

Finds an element using a FindExpression.

Declaration

cs-api-definition
public abstract TElement Get(TFindExpression expr)

Parameters

expr

TFindExpression

The FindExpression<T> to use to locate the element.

Returns

TElement

The element or null if no matching element found.

Get(TFindExpression, bool, int)

Finds an element using a FindExpression.

Declaration

cs-api-definition
public TElement Get(TFindExpression expr, bool waitOnElement, int timeout)

Parameters

expr

TFindExpression

The FindExpression<T> to use to locate the 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. If waitOnElement is false, this parameter is not used.

Returns

TElement

The element or null if no matching element found within the timeout period.

Get(params string[])

Finds an element using a FindExpression.

Declaration

cs-api-definition
public TElement Get(params string[] clauses)

Parameters

clauses

string[]

A list of clauses to use to find the element.

Returns

TElement

The element or null if no matching element found.

GetElement(TFindExpression, bool, int)

Declaration

cs-api-definition
protected abstract TElement GetElement(TFindExpression expr, bool waitOnElement, int timeout)

Parameters

expr

TFindExpression

waitOnElement

bool

timeout

int

Returns

TElement