public void ShowLessForNotification() { test = extent.StartTest("Test for Show Less functionality for Notifications"); Dashboard dashboardObj = new Dashboard(); dashboardObj.LoadMoreSteps(); dashboardObj.ClickOnShowLessStep(); int ActualCount = dashboardObj.AllServices(); try { Assert.That(ActualCount > 0); //Assert.AreEqual(ActualCount, 5); test.Log(LogStatus.Pass, "Able to load Less Services by clicking on Show Less Tab"); Console.WriteLine("Test Pass: Able to cick on Show Less tab"); } catch (Exception e) { test.Log(LogStatus.Fail, "Not able to click on Show Less tab"); Console.WriteLine(e + "Test failed: can not clcick on Show Less tab"); } }
public void LoadMoreForNotification() { test = extent.StartTest("Test for Load More functionality for Notifications"); Dashboard dashboardObj = new Dashboard(); dashboardObj.LoadMoreSteps(); Thread.Sleep(10000); //bool ActualCount = dashboardObj.AllServices(); int ActualCount = dashboardObj.AllServices(); try { Assert.Greater(ActualCount, 5); test.Log(LogStatus.Pass, "Able to load more Services"); Console.WriteLine("Test Pass: Able to cick on Load More tab"); } catch (Exception e) { test.Log(LogStatus.Fail, "Not able to click on Load More tab"); Console.WriteLine(e + "Test failed: can not clcick on Load More tab"); } }