Represents the hierarchical control (a control containing structured hierarchy of controls of TItem type). Default search finds the first occurring element.

Inherited from Control.


[FindSettings(OuterXPath = "./", TargetName = nameof(Children))]
public class HierarchicalControl<TItem, TOwner> : Control<TOwner>
    where TItem : HierarchicalItem<TItem, TOwner>
    where TOwner : PageObject<TOwner>


public ControlList<TItem, TOwner>

Children { get; }

Gets the children ControlList<TItem, TOwner> instance.

public ControlList<TItem, TOwner>

Descendants { get; }

Gets the descendants (all items at any level of hierarchy) ControlList<TItem, TOwner> instance.

Control.Descendants[x => x.Name == "Item 2.2"].Click();


public TItem this

[int index] { get; }

Gets the child item at the specified index.

Control[1].Name.Should.Equal("Item 2");
public TItem this

[Expression<Func<TItem, bool>> predicateExpression] { get; }

Gets the child item that matches the conditions defined by the specified predicate expression.

Control[x => x.Name == "Item 1"].Should.Exist();