Пример #1
0
 public void ThenUserShouldBeAbleToSee(string userFullName)
 {
     try
     {
         HomePage homePage = new HomePage(CustomBaseClass.MyDriver);
         AssertClass.ContainsText(homePage.textUserFullName, userFullName);
         DriverClass.CloseTest();
     }
     catch (Exception E)
     {
         Console.WriteLine("Test Failed: could not verify username: {0}", E.Message);
         DriverClass.CloseTest();
         throw;
     }
 }
Пример #2
0
 public void ThenUserShouldGetMessage(string error)
 {
     try
     {
         CustomBaseClass.Thinktime(10);
         LoginPage loginPage = new LoginPage();
         AssertClass.ContainsText(loginPage.invalidUserError, error);
         DriverClass.CloseTest();
     }
     catch (Exception E)
     {
         Console.WriteLine("Test Fail: Error message is incorrect: {0}", E.Message);
         DriverClass.CloseTest();
         throw;
     }
 }