Exemple #1
0
        public void DivTable_HasRowsAndHeaders()
        {
            var divTable = new DivTable(_webDriver);

            divTable.Open();

            var tableElement = divTable.DivTableElementBySelectors;

            tableElement.TableHeaderValues.Should().HaveCount(3);
            tableElement.TableRowElements.Should().HaveCount(3);
        }
Exemple #2
0
        public void DivTable_MatchHeaderWithColumn_TableElementByElements()
        {
            var divTable = new DivTable(_webDriver);

            divTable.Open();

            var tableElement    = divTable.DivTableElementByElements;
            var tableRowElement = tableElement.TableRowElements.Single(x => x.GetColumn("First name").Text == "Beta");

            tableRowElement.GetColumn("Last name").Text.Should().Be("Bit");
            tableRowElement.GetColumn("Specialty").Text.Should().Be("Make special together");
        }
Exemple #3
0
        public void DivTable_HeaderValues()
        {
            var expectedHeaders = new List <string>()
            {
                "First name", "Last name", "Specialty"
            };

            var divTable = new DivTable(_webDriver);

            divTable.Open();

            var tableElement      = divTable.DivTableElementBySelectors;
            var tableHeaderValues = tableElement.TableHeaderValues;

            tableHeaderValues.Should().BeEquivalentTo(expectedHeaders, options => options.WithStrictOrdering());
        }