public void MaximizeAndMinimizeForAllSection() { try { test = extent.CreateTest("MaximizeAndMinimizeForAllSection").Info("Test Started"); IMTRLandingPage imtr = new IMTRLandingPage(BaseTest.driver); IMTRPropertyDetailsPage imtrPropdetails = new IMTRPropertyDetailsPage(BaseTest.driver); imtr.ClickTrackRecordOnInMenu(); Thread.Sleep(3000); imtr.ClickOngoingDeals(); imtr.NavigateToIMTRPropDetail(); imtrPropdetails.Capitalization_MaximizeMinimize(); imtrPropdetails.Investor_MaximizeMinimize(); imtrPropdetails.SponsorEquity_MaximizeMinimize(); imtrPropdetails.ThirdParty_MaximizeMinimize(); imtrPropdetails.PurchasePrice_MaximizeMinimize(); Boolean res = imtrPropdetails.GeneralInfo_MaximizeMinimize(); Assert.True(res == true, "Maximize minimize does not work"); test.Log(Status.Pass, "Test Case Passed"); } catch (Exception e) { test.Log(Status.Fail, "Test Case Failed"); baseTest.TakeScreenshot(); Console.WriteLine(e.StackTrace); } }