Beispiel #1
0
        public void AddLoan_VerifyAddLoanAllDropdownFieldsAreMandatory()
        {
            try
            {
                test = extent.CreateTest("AddLoan_VerifyAddLoanAllDropdownFieldsAreMandatory").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_LenderNameIsMandatory();
                String alert1 = debt.CaptureAlertMessage();
                Assert.IsTrue(alert1 == "All Fields are mandatory", "Loan can be addedd without lender details");

                debt.AddLoan_PropertyNameIsMandatory();
                String alert2 = debt.CaptureAlertMessage();
                Assert.IsTrue(alert2 == "All Fields are mandatory", "Loan can be addedd without property name details");

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