Skip to content

Instantly share code, notes, and snippets.

@batmi02
Created May 7, 2020 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save batmi02/67b3657cf71f58c3ba3f2c02a24b19f5 to your computer and use it in GitHub Desktop.
Save batmi02/67b3657cf71f58c3ba3f2c02a24b19f5 to your computer and use it in GitHub Desktop.
@Test
public void loginTest() {
//Open browser
//This is our first instruction, directing us to the login page. One line of code.
driver.get("http://localhost:8000/loginBefore.html")
//Click on the Login button
//This is our second instruction, directing action by finding the id 'log-in' and clicking. One line of code.
driver.findElement(By.id("log-in")).click();
//Assertions Section
//3 lines of code - open a capture session, capture the window, and close the capture
//Start the test
eyes.open(driver, "Demo App", "Login Page Test", new RectangeleSize(800, 800));
//Take a screenshot so AI can analyze
eyes.checkWindow("Login Window");
//End the test
eyes.closeAsync();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment