예제 #1
0
        public void WhenClientClickSignOutButton()
        {
            LoginPage loginPage = new LoginPage();

            CustomBaseClass.Thinktime(5);
            loginPage.ClickSignOutButton();
        }
예제 #2
0
        public void WhenUserUserClicksSignInLink()
        {
            LoginPage loginPage = new LoginPage();

            loginPage.ClickSignInLink();
            CustomBaseClass.Thinktime(5);
        }
예제 #3
0
        public void WhenUserNavigateToAgileBooksPage()
        {
            CustomBaseClass.Thinktime(3);
            //HomePage homePage = new HomePage();
            //homePage.NavigateToAgileBooks();

            LoginPage loginPage = new LoginPage();

            loginPage.NavigateToAgileBooks();
        }
예제 #4
0
 public void ThenUserShouldBeAbleToLoginSuccesfully(String firstName)
 {
     try
     {
         CustomBaseClass.Thinktime(5);
         LoginPage loginPage = new LoginPage(CustomBaseClass.MyDriver);
         AssertClass.AssertElementIsPresent(CustomBaseClass.MyDriver.FindElement(By.XPath("//div[contains(text(),'" + firstName + "')]")));
     }
     catch (Exception E)
     {
         Console.WriteLine("Test Failed: could not login to the application : {0}", E.Message);
         DriverClass.CloseTest();
         throw;
     }
 }
예제 #5
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;
     }
 }
예제 #6
0
 public void ThenClientShouldBeAbleToLoginSuccessfully()
 {
     try
     {
         LoginPage loginPage = new LoginPage();
         AssertClass.AssertElementIsPresent(loginPage.signOutButton);
         CustomBaseClass.Thinktime(5);
         //LoginPage loginPage = new LoginPage();
         // loginPage.NavigateToAgileBooks();
         //loginPage.linkBooks.Click();
     }
     catch (Exception E)
     {
         Console.WriteLine("Test Fail: did not landed to Welcome Page  : {0}", E.Message);
         ScreenShotsClass.FailedTestCaptureScreenShot("Login");
         DriverClass.CloseTest();
         throw;
     }
 }