コード例 #1
0
 public void KPI_VerifyFieldLabels()
 {
     try
     {
         test = extent.CreateTest("KPI_VerifyFieldLabels").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();
         String occupancy   = operating.KPI_VerifyLabelOccupancy();
         String InPlaceRent = operating.KPI_VerifyLabelinPlaceRent();
         String Yoc         = operating.KPI_VerifyLabelYOC();
         String CashOnCash  = operating.KPI_VerifyLabelCashOnCash();
         String DebtYeild   = operating.KPI_VerifyLabelDebtYield();
         String dscr        = operating.KPI_VerifyLabelDSCR();
         Assert.IsTrue(occupancy == "Occupancy", $"Expected:'Occupancy' does not match actual {occupancy}");
         Assert.IsTrue(InPlaceRent == "In Place Avg Rent", $"Expected:'In Place Avg Rent' does not match actual {InPlaceRent}");
         Assert.IsTrue(Yoc == "YOC", $"Expected:'YOC' does not match actual {Yoc}");
         Assert.IsTrue(CashOnCash == "Cash on Cash Yield", $"Expected:'Cash on Cash Yield' does not match actual {CashOnCash}");
         Assert.IsTrue(DebtYeild == "Debt Yield", $"Expected:'Debt Yield' does not match actual {DebtYeild}");
         Assert.IsTrue(dscr == "DSCR", $"Expected:'DSCR' does not match actual {dscr}");
         test.Log(Status.Pass, "Test Case passed");
     }
     catch (Exception e)
     {
         test.Log(Status.Fail, "Test Case Failed");
         baseTest.TakeScreenshot();
         Console.WriteLine(e.StackTrace);
     }
 }