ClassTestRegion
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:
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
public TestRegionCollection AllChildRegions { get; }
Property Value
ChildRegions
Gets a list of all direct sub regions of this region.
Declaration
public TestRegionCollection ChildRegions { get; }
Property Value
Element
Gets the element object that represents this region in the Dom tree.
Find
Gets the Find object associated with this test region. All searchs from this object will be scoped to this region.
Parent
Gets the parent Region that this region is within. Else will return null.
Methods
ContainsElement(Element, bool)
Checks if a certain element is contained in this region or not.
Declaration
public bool ContainsElement(Element element, bool verifyDirectChildrenOnly)
Parameters
element
The element to check.
verifyDirectChildrenOnly
Check only the direct children of this region. If false, this method will check all sub regions too.
Returns
True/False whether the element is contained or not.
Equals(object)
Defined how two TestRegions should be compared.
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
public static TestRegion GetContainerRegion(Element element)
Parameters
element
The element to find its container test region.
Returns
The testregion found or null.
GetHashCode()
Get the hash code for this testregion.
Declaration
public override int GetHashCode()
Returns
The hash code.
Overrides
Refresh(bool)
Refresh the test region.
Declaration
public void Refresh(bool forceDomTreeRefresh)
Parameters
forceDomTreeRefresh
Whether to update the complete DOM before trying to refresh the region element.