Esempio n. 1
0
        public void CheckRowValuesAreBetween(IElementCollectionWrapper column, string behavior, int value1, int value2)
        {
            Assert.ShouldBecome(() => column.Stale, false, $"{column.Caption} is stale");
            var elementsText = ListServices.GetElementsTextsList(column.Elements);

            Assert.ShouldBecome(() => ListServices.CheckValuesAreBetween(elementsText, value1, value2),
                                !behavior.Contains("not"),
                                $"values are {elementsText.Aggregate((x, y) => $"{x}, {y}")}");
        }
Esempio n. 2
0
        public void CompareTableRowGreaterLesser(IElementCollectionWrapper column, string condition,
                                                 int value)
        {
            Assert.ShouldBecome(() => column.Stale, false, $"{column.Caption} is stale");
            var elementsText = ListServices.GetElementsTextsList(column.Elements);

            Assert.ShouldBecome(() => ListServices.CheckListValuesLesserGreater(elementsText, condition, value), true,
                                $"values are {elementsText.Aggregate((x, y) => $"{x}, {y}")}");
        }
 public void ClickByIndexThreeTimes(int index, IElementCollectionWrapper elements)
 {
     elements.ClickByIndex(index - 1);
     elements.ClickByIndex(index - 1);
     elements.ClickByIndex(index - 1);
 }
 public void ClickTwiceByIndex(int index, IElementCollectionWrapper elements)
 {
     elements.ClickByIndex(index - 1);
     elements.ClickByIndex(index - 1);
 }
Esempio n. 5
0
        public void CheckRowIsExpanded(int index, IElementCollectionWrapper table, string behavior)
        {
            var check = table.GetAttributeByIndex("class", index - 1).Contains("expandable-expanded-row");

            check.Should().Be(!behavior.Contains("not"));
        }
Esempio n. 6
0
 public void CheckTableContainRow(ITableWrapper table, string behavior, string value, IElementCollectionWrapper column)
 {
     Assert.ShouldBecome(() => column.Stale, false, $"{column.Caption} is stale");
     Assert.ShouldBecome(() => table.Text.Contains(value), true, $"{table.Caption} text is {table.Text}");
     Assert.ShouldBecome(() => column.Elements.Any(x => x.Stale), false,
                         $"{table.Caption} elements are stale");
     ListServices.GetElementsTextsList(column.Elements).Contains(value).Should().Be(!behavior.Contains("not"));
 }