public void VerifySwitchingBetweenViews() { //try //{ test = extent.CreateTest("VerifySwitchingBetweenViews").Info("Test Started"); //Verify user can switch between card and list view BudgetSummaryPage budget = new BudgetSummaryPage(BaseTest.driver); budget.ClickBudgetSummaryMenu(); Thread.Sleep(3000); //Verify user can switch to list view Boolean lview = budget.ChangeToListView(); Assert.IsTrue(lview == true, "View not changed to list view"); driver.Navigate().Refresh(); Thread.Sleep(5000); //Verify user can switch to card view Boolean cview = budget.ChangeToCardView(); Assert.IsTrue(cview == true, "View not changed to card view"); 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 DevelopmentBudget_VerifyListViewColumnLabels() { try { String l1 = "Job Code"; String l2 = "Job Description"; String l3 = "Property Name"; String l4 = "Invoiced Amount"; String l5 = "New Budget Amount"; String l6 = "Over Budget Amount"; test = extent.CreateTest("DevelopmentBudget_VerifyListViewColumnLabels").Info("Test Started"); BudgetSummaryPage budget = new BudgetSummaryPage(BaseTest.driver); NavigationMenuPage navigation = new NavigationMenuPage(BaseTest.driver); navigation.ClickMainMenu(); navigation.ClickBudgetSummaryOption(); budget.ChangeToListView(); String label1 = budget.ListView_ReturnJobCodelabel(); Assert.IsTrue(l1 == label1, $"Label on screen '{label1}' does not match expected '{l1}'"); String label2 = budget.ListView_ReturnJobDescriptionlabel(); Assert.IsTrue(l2 == label2, $"Label on screen '{label2}' does not match expected '{l2}'"); String label3 = budget.ListView_ReturnPropertyNamelabel(); Assert.IsTrue(l3 == label3, $"Label on screen '{label3}' does not match expected '{l3}'"); String label4 = budget.ListView_ReturnInvoicedAmountlabel(); Assert.IsTrue(l4 == label4, $"Label on screen '{label4}' does not match expected '{l4}'"); String label5 = budget.ListView_ReturnNewBudgetAmountlabel(); Assert.IsTrue(l5 == label5, $"Label on screen '{label5}' does not match expected '{l5}'"); String label6 = budget.ListView_ReturnOverBudgetAmountlabel(); Assert.IsTrue(l6 == label6, $"Label on screen '{label6}' does not match expected '{l6}'"); test.Log(Status.Pass, "Test Case Passed"); } catch (Exception e) { test.Log(Status.Fail, "Test Case Failed"); TakeScreenshot(); Console.WriteLine(e.StackTrace); } }