Represents the table control (<table>). Default search finds the first occurring <table> element.

Inherited from Control.


[ControlDefinition("table", IgnoreNameEndings = "Table")]
public class Table<THeader, TRow, TOwner> : Control<TOwner>
    where THeader : TableHeader<TOwner>
    where TRow : TableRow<TOwner>
    where TOwner : PageObject<TOwner>
public class Table<TRow, TOwner> : Table<TableHeader<TOwner>, TRow, TOwner>
    where TRow : TableRow<TOwner>
    where TOwner : PageObject<TOwner>
public class Table<TOwner> : Table<TableHeader<TOwner>, TableRow<TOwner>, TOwner>
    where TOwner : PageObject<TOwner>


public ControlList<THeader, TOwner>

Headers { get; }

Gets the headers list.

Table.Headers.Should.ContainHavingContent(TermMatch.Equals, "Name", "Amount");
public TableRowList<TRow, TOwner>

Rows { get; }

Gets the rows list.

Table.Rows[x => x.Content == "some content"].Click();


<table id="products" class="table">
            <td>Item 1</td>
            <td>Item 2</td>
Name Amount Actions
Item 1 5
Item 2 10
using Atata;

namespace SampleApp.UITests
    using _ = SamplePage;

    public class SamplePage : Page<_>
        public Table<ProductTableRow, _> Products { get; private set; }

        public class ProductTableRow : TableRow<_>
            public Text<_> Name { get; private set; }

            public Number<_> Amount { get; private set; }

            public Button<_> Delete { get; private set; }

Default search of the properties of type Content and inherited (e.g. Name and Amount) that are declared in the class inherited from TableRow is performed by the column header.

    Products.Rows[x => x.Name == "Item 1"].Amount.Should.Equal(5).
    Products.Rows[x => x.Name == "Item 1"].Delete().
    Products.Rows[x => x.Name == "Item 1"].Should.Not.Exist();