public void KPI_VerifyCashOnCashCalculation() { try { test = extent.CreateTest("KPI_VerifyCashOnCashCalculation").Info("Test Started"); NavigationMenuPage navigation = new NavigationMenuPage(BaseTest.driver); AssetSummaryPage asset = new AssetSummaryPage(BaseTest.driver); Asset_OperatingSummaryAndMapsPage operating = new Asset_OperatingSummaryAndMapsPage(BaseTest.driver); navigation.ClickMainMenu(); navigation.ClickPropertyMaintenanceOption(); asset.NavigateToPropertyDetails(); operating.ClickOperatingSummarytab(); operating.RadioButton_SelectYTD(); double original = operating.KPI_ActualCachOnCashYieldValue(); double calculated = operating.KPI_Calculate_CachOnCashValue(); Assert.IsTrue(original == calculated, $"Value displayed in KPI:'{original}' does not match:'{calculated}'"); test.Log(Status.Pass, "Test Case passed"); } catch (Exception e) { test.Log(Status.Fail, "Test Case Failed"); baseTest.TakeScreenshot(); Console.WriteLine(e.StackTrace); } }
public void OperatingSummary_VerifyYTDIsSelected() { try { test = extent.CreateTest("OperatingSummary_VerifyYTDIsSelected").Info("Test Started"); NavigationMenuPage navigation = new NavigationMenuPage(BaseTest.driver); AssetSummaryPage asset = new AssetSummaryPage(BaseTest.driver); Asset_OperatingSummaryAndMapsPage operating = new Asset_OperatingSummaryAndMapsPage(BaseTest.driver); navigation.ClickMainMenu(); navigation.ClickPropertyMaintenanceOption(); Thread.Sleep(3000); asset.NavigateToPropertyDetails(); operating.ClickOperatingSummarytab(); operating.RadioButton_SelectYTD(); String label1 = operating.OperatingSummary_ReturnColumnLablel1(); String label2 = operating.OperatingSummary_ReturnColumnLablel2(); String label3 = operating.OperatingSummary_ReturnColumnLablel3(); Assert.IsTrue(label1 == "YTD Actual" && label2 == "YTD Budget" && label3 == "YTD Proforma", $"Operating summary label{label1} does not macth with actual"); test.Log(Status.Pass, "Test Case passed"); } catch (Exception e) { test.Log(Status.Fail, "Test Case Failed"); baseTest.TakeScreenshot(); Console.WriteLine(e.StackTrace); } }