Esempio n. 1
0
        public void ThenInvoicePageWithCorrectDataIsDisplayed(Table table)
        {
            InvoicePage invoicePage = new InvoicePage(driver);

            var depositNow        = table.Rows[0]["DepositNow"];
            var taxAndVat         = table.Rows[0]["Tax&VAT"];
            var TotalAmount       = table.Rows[0]["TotalAmount"];
            var depositActual     = invoicePage.InvoiceData("Deposit Now", depositNow).Text;
            var taxAndVatActual   = invoicePage.InvoiceData("Tax & VAT", taxAndVat).Text;
            var TotalAmountActual = invoicePage.InvoiceData("Total Amount", TotalAmount).Text;

            Assert.IsTrue(depositActual.Contains(depositNow), "Incorrect value is displayed. It should be {0} instead of {1}", depositNow, depositActual);
            Assert.IsTrue(taxAndVatActual.Contains(taxAndVat), "Incorrect value is displayed. It should be {0} instead of {1}", taxAndVat, taxAndVatActual);
            Assert.IsTrue(TotalAmountActual.Contains(TotalAmount), "Incorrect value is displayed. It should be {0} instead of {1}", TotalAmount, TotalAmountActual);
        }