Example #1
0
        /// <summary>
        /// Counts total of items in the registry search column, which should align with number of rows in detailed report
        /// if the search yields no result, no table is produced, hence 0 is returned
        /// </summary>
        /// <returns>total number of items in registry search column</returns>
        private int CountItemsProductivityReport()
        {
            try
            {
                var checkProductivityReport = driver.FindElement(By.Id(productivityReportId));
                checkProductivityReport.Click();

                var RunReport = driver.FindElement(By.Id(runReportId));
                RunReport.Click();

                validation.StringLogger.LogWrite("Validation for Checking and Running Productivity Report is Passed");
                _test.Log(Status.Pass, "Validation for Checking and Running Productivity Report is Passed");
            }
            catch (Exception)
            {
                _test.Log(Status.Fail, "Validation for Checking and Running Productivity Report is Failed");
            }

            // Checks whether table exits
            if (driver.FindElements(By.Id(productivityReportTableId)).Count != 0)
            {
                table = new TableInterface(productivityReportTableId, driver);
                return(countProductivity());
            }
            else
            {
                return(0);
            }
        }
        public PackageResultsPage VerifyCommentCanBeAdded(string comment = "Comment generated by KYC-Automation project")
        {
            TableInterface commentTable;
            int            numComments;

            try
            {
                commentTable = new TableInterface(commentTableId, driver);
                numComments  = commentTable.GetTotalNumRows();
            }
            catch (Exception)
            {
                numComments = 0;
            }

            try
            {
                driver.SendKeysById(commentTextFieldId, comment);
                driver.ClickById(addCommentButtonId);

                commentTable = new TableInterface(commentTableId, driver);

                validation.AssertAreEqual(numComments + 1, commentTable.GetTotalNumRows());
                validation.AssertAreEqual(comment, commentTable.GetElementByIndexes(numComments, commentColumnIndex).Text);
                validation.StringLogger.LogWrite("Validation for Adding Comments is Passed");
                _test.Log(Status.Pass, "Validation for Adding Comments is Passed");
            }
            catch (Exception)
            {
                _test.Log(Status.Fail, "Validation for Adding Comments is Failed");
            }
            return(this);
        }
Example #3
0
        public TableInterface VerifTableById(int idSquare, int idLine, int idTable)
        {
            TableInterface res = null;
            int            i   = 0;

            while (i < SquareList[idSquare].LineList[idLine].ListTable.Count)
            {
                if (idTable == SquareList[idSquare].LineList[idLine].ListTable[i].IdTable)
                {
                    res = SquareList[idSquare].LineList[idLine].ListTable[i];
                }
                i++;
            }

            return(res);
        }
Example #4
0
        public TableInterface FindTableById(int IdTable)
        {
            TableInterface res = null;

            if (IdTable < 7)
            {
                res = VerifTableById(0, 0, IdTable);
            }
            else if (IdTable < 17)
            {
                res = VerifTableById(0, 1, IdTable);
            }
            else if (IdTable < 25)
            {
                res = VerifTableById(1, 0, IdTable);
            }
            else if (IdTable < 32)
            {
                res = VerifTableById(1, 1, IdTable);
            }

            return(res);
        }
Example #5
0
 internal ManualWorkQueuePage() : base(true)
 {
     table = new TableInterface(packageTableId, driver);
 }
 internal AdminReportingPage()
 {
     driver.FindElement(By.LinkText("Package items on hold for Invoice")).Click();
     table = new TableInterface(packageItemsTableId, driver);
 }
 public ResultQueuePage()
 {
     table = new TableInterface(resultsTableId, driver);
     validation.AssertAreEqual(numColumnsExpected, table.GetNumColumns());
 }
Example #8
0
 internal AutomationWorkQueuePage() : base(true)
 {
     table = new TableInterface(packageTableId, driver);
 }
Example #9
0
 public PackagesQueuePage(bool shouldAssertIsTrue = true) : base(shouldAssertIsTrue)
 {
     table = new TableInterface(packageTableId, driver);
 }
 public PackageSummaryPage()
 {
     packageItems = new TableInterface(packageItemsTableId, driver);
 }
 public QuebecSearchResultsPage() : base()
 {
     table = new TableInterface(quebecNamesDatabaseTableId, driver);
 }
 public NUANSSearchResultsPage() : base()
 {
     table = new TableInterface(nuansNamesDatabaseTableId, driver);
 }
 public ResultSummaryPage()
 {
     informationTable = new TableInterface(searchInformationTableId, driver);
     statusTable      = new TableInterface(searchStatusTableId, driver);
 }