Skip to content

Instantly share code, notes, and snippets.

@tjmaher
Created July 29, 2015 03:28
Show Gist options
  • Select an option

  • Save tjmaher/e934a4b281131bb98991 to your computer and use it in GitHub Desktop.

Select an option

Save tjmaher/e934a4b281131bb98991 to your computer and use it in GitHub Desktop.
package tests;
import base.DriverFactory;
import static org.testng.Assert.assertEquals;
import org.testng.annotations.Test;
import utils.DriverUtils;
import static enums.UserEnum.*;
public class LoginTest {
@Test
public void test_Login() {
DriverFactory df = new DriverFactory(DriverUtils.getDriver());
df.login.navigateToLoginPage();
assertEquals(df.login.getHeaderText(), "Login Page", "The Login page did not display! (FAIL)");
df.login.verifyDefaultElementsDisplay();
df.login.logIntoPage(TOM_SMITH);
df.secure.verifyDefaultElementsDisplay();
assertEquals(df.secure.getHeaderText(), "Secure Area", "The Secure Area page did not display! (FAIL)");
df.secure.logOutOfSecureArea();
assertEquals(df.login.getHeaderText(), "Login Page", "The Login page did not display! (FAIL)");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment