Created
May 7, 2020 14:08
-
-
Save batmi02/67b3657cf71f58c3ba3f2c02a24b19f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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