예제 #1
0
 public void DevelopmentBudget_VerifyCardLabels()
 {
     try
     {
         String l1 = "Job Code:";
         String l2 = "Property Name:";
         String l3 = "Invoiced Amount:";
         String l4 = "New Budget Amount:";
         String l5 = "Over Budget Amount:";
         test = extent.CreateTest("DevelopmentBudget_VerifyCardLabels").Info("Test Started");
         BudgetSummaryPage  budget     = new BudgetSummaryPage(BaseTest.driver);
         NavigationMenuPage navigation = new NavigationMenuPage(BaseTest.driver);
         navigation.ClickMainMenu();
         navigation.ClickBudgetSummaryOption();
         String label1 = budget.CardView_ReturnJobCodelabel();
         Assert.IsTrue(l1 == label1, $"Label on screen '{label1}' does not match expected '{l1}'");
         String label2 = budget.CardView_ReturnPropertyNamelabel();
         Assert.IsTrue(l2 == label2, $"Label on screen '{label2}' does not match expected '{l2}'");
         String label3 = budget.CardView_ReturnInvoicedAmountlabel();
         Assert.IsTrue(l3 == label3, $"Label on screen '{label3}' does not match expected '{l3}'");
         String label4 = budget.CardView_ReturnNewBudgetlabel();
         Assert.IsTrue(l4 == label4, $"Label on screen '{label4}' does not match expected '{l4}'");
         String label5 = budget.CardView_ReturnOverBudgetlabel();
         Assert.IsTrue(l5 == label5, $"Label on screen '{label5}' does not match expected '{l5}'");
         test.Log(Status.Pass, "Test Case Passed");
     }
     catch (Exception e)
     {
         test.Log(Status.Fail, "Test Case Failed");
         TakeScreenshot();
         Console.WriteLine(e.StackTrace);
     }
 }