public void VerifyAlertTextForOngoingDealsKeepingDateEmpty() { try { test = extent.CreateTest("VerifyAlertTextForOngoingDealsKeepingDispostionDateEmpty").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.SerachProperty(); imtr.clickOnCard(); imtr.clickOnEditIcon(); Thread.Sleep(5000); bool res = imtr.SoldPrice(); Assert.IsTrue(res == true, "Failed to get the error message"); } catch (Exception e) { test.Log(Status.Fail, "Test Case Failed"); baseTest.TakeScreenshot(); Console.WriteLine(e.StackTrace); } }