Class
TestRegion

Class representing a TestRegion Object defined in the document as:

<testregion id="foo"> ... </testregion>

or

<!--testregion id="foo"--> ... <!--/testregion>

Definition

Namespace:ArtOfTest.WebAii.ObjectModel

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class TestRegion

Inheritance: objectTestRegion

Properties

AllChildRegions

Gets a list of all sub regions contained in this region regardless of their depth relative to this region.

Declaration

cs-api-definition
public TestRegionCollection AllChildRegions { get; }

Property Value

TestRegionCollection

ChildRegions

Gets a list of all direct sub regions of this region.

Declaration

cs-api-definition
public TestRegionCollection ChildRegions { get; }

Property Value

TestRegionCollection

Element

Gets the element object that represents this region in the Dom tree.

Declaration

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

Property Value

Element

Find

Gets the Find object associated with this test region. All searchs from this object will be scoped to this region.

Declaration

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

Property Value

Find

Id

Gets the region id.

Declaration

cs-api-definition
public string Id { get; }

Property Value

string

Parent

Gets the parent Region that this region is within. Else will return null.

Declaration

cs-api-definition
public TestRegion Parent { get; }

Property Value

TestRegion

Methods

ContainsElement(Element, bool)

Checks if a certain element is contained in this region or not.

Declaration

cs-api-definition
public bool ContainsElement(Element element, bool verifyDirectChildrenOnly)

Parameters

element

Element

The element to check.

verifyDirectChildrenOnly

bool

Check only the direct children of this region. If false, this method will check all sub regions too.

Returns

bool

True/False whether the element is contained or not.

Equals(object)

Defined how two TestRegions should be compared.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare.

Returns

bool

True/False whether the two objects are equal.

Overrides object.Equals(object)

GetContainerRegion(Element)

This static methods can test whether an element falls within a Test Region. If it does, it will return the region that contains it. If the Element passed in is a test region then the function will return that element's test region. Otherwise will return null.

Declaration

cs-api-definition
public static TestRegion GetContainerRegion(Element element)

Parameters

element

Element

The element to find its container test region.

Returns

TestRegion

The testregion found or null.

GetHashCode()

Get the hash code for this testregion.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

The hash code.

Overrides object.GetHashCode()

Refresh()

Refresh this test region.

Declaration

cs-api-definition
public void Refresh()

Refresh(bool)

Refresh the test region.

Declaration

cs-api-definition
public void Refresh(bool forceDomTreeRefresh)

Parameters

forceDomTreeRefresh

bool

Whether to update the complete DOM before trying to refresh the region element.