public void ArchiveIMTROngoingDeals() { try { test = extent.CreateTest("ArchiveIMTROngoingDeals").Info("Test Started"); NavigationMenuPage navigation = new NavigationMenuPage(BaseTest.driver); IMTRLandingPage imtr = new IMTRLandingPage(BaseTest.driver); navigation.ClickMainMenu(); navigation.ClickTrackRecordOption(); imtr.ClickOngoingDeals(); Thread.Sleep(3000); imtr.clickOnCard(); int NumberOfLoanBeforeArchive = imtr.CountNumberOfLoan(); imtr.clickOnArchiveIcon(); int NumberOfLoanAfterArchive = imtr.CountNumberOfLoan(); Assert.IsTrue(NumberOfLoanBeforeArchive > NumberOfLoanAfterArchive, "Failed to archived loan"); } catch (Exception e) { test.Log(Status.Fail, "Test Case Failed"); baseTest.TakeScreenshot(); Console.WriteLine(e.StackTrace); } }