Exemplo n.º 1
0
        public static void VerifyCellExistsInFilmHireGrid(bool shouldExist, List<string> cellValues,
            string rowNumber = "Row 1", string instanse = "1")
        {
            foreach (var cellValue in cellValues)
            {
                var rowWithCell = new WinRow(WindowFilmHire());
                rowWithCell.SearchProperties[UITestControl.PropertyNames.Name] = rowNumber;

                var cellToVerify = new WinCell(rowWithCell);
                cellToVerify.SearchProperties[WinCell.PropertyNames.Value] = cellValue;
                cellToVerify.SearchProperties[WinCell.PropertyNames.Instance] = instanse;

                if (shouldExist == true)
                {
                    Assert.AreEqual(cellValue, cellToVerify.Value);
                }
                else
                {
                    // Use only once in each test , because it is very slow
                    Assert.IsTrue(cellToVerify.WaitForControlNotExist(Playback.PlaybackSettings.SearchTimeout), cellValue + "Exists");
                }
            }
        }
Exemplo n.º 2
0
        // Trying to find cell with specific text in the whole grid, works for all cabinets
        public static void VerifyCellExistsInCabinetGrid(bool shouldExist, List<string> cellValues)
        {
            foreach (var cellValue in cellValues)
            {
                var cellToVerify = new WinCell(WindowCabinet());
                cellToVerify.SearchProperties[WinCell.PropertyNames.Value] = cellValue;

                if (shouldExist == true)
                {
                    Assert.AreEqual(cellValue, cellToVerify.Value);
                }
                else
                {
                    // Use only once in each test , because it is very slow
                    Assert.IsTrue(cellToVerify.WaitForControlNotExist(Playback.PlaybackSettings.SearchTimeout), cellValue + "Exists");
                }
            }
        }