Beispiel #1
0
        public void AddLoan_VerifyAddLoanAllFieldsAreMandatory()
        {
            try
            {
                test = extent.CreateTest("AddLoan_VerifyAddLoanAllFieldsAreMandatory").Info("Test Started");
                DebtSummaryPage    debt       = new DebtSummaryPage(BaseTest.driver);
                NavigationMenuPage navigation = new NavigationMenuPage(BaseTest.driver);
                AssetSummaryPage   funds      = new AssetSummaryPage(BaseTest.driver);
                Thread.Sleep(3000);
                funds.ClickDebtSummary();
                debt.AddLoan_TotalLoanCommitmentIsMandatory();
                String alert1 = debt.CaptureAlertMessage();
                Assert.IsTrue(alert1 == "All Fields are mandatory", "Loan can be addedd without commitment details");

                debt.AddLoan_OriginationDateIsMandatory();
                String alert2 = debt.CaptureAlertMessage();
                Assert.IsTrue(alert2 == "All Fields are mandatory", "Loan can be addedd without origination date details");

                debt.AddLoan_InitialMaturityIsMandatory();
                String alert3 = debt.CaptureAlertMessage();
                Assert.IsTrue(alert3 == "All Fields are mandatory", "Loan can be addedd without Initial Maturity details");

                debt.AddLoan_InterestRateTypeIsMandatory();
                String alert4 = debt.CaptureAlertMessage();
                Assert.IsTrue(alert4 == "All Fields are mandatory", "Loan can be addedd without interest rate details");
            }
            catch (Exception e)
            {
                test.Log(Status.Fail, "Test Case Failed");
                baseTest.TakeScreenshot();
                Console.WriteLine(e.StackTrace);
            }
        }