Skip to content

Instantly share code, notes, and snippets.

@batmi02
Created November 14, 2019 00:22
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/064331586bd05939b875c203ca41e6ec to your computer and use it in GitHub Desktop.
Save batmi02/064331586bd05939b875c203ca41e6ec to your computer and use it in GitHub Desktop.
@Before
public void beforeEach() {
}
@Test
public void chartTest1() {
eyes.open(driver, "Demo App", "ChartTest 1", new RectangleSize(1200,800));
driver.get("http://localhost:8000/BarChart.html");
eyes.checkWindow("1st Test Window");
eyes.closeAsync();
}
@Test
public void chartTest2() {
eyes.open(driver, "Demo App", "ChartTest 2", new RectangleSize(1200,800));
driver.get("http://localhost:8000/BarChart.html");
driver.findElement(By.id("addDataSet")).click();
try {
Thread.sleep(500);
} catch(InteruptedException e) {
e.printStackTrace();
}
eyes.checkWindow("2nd Test Window");
eyes.closeAsync();
}
@AfterClass
public static void afterClass() {
// Close the browser
driver.quit();
// If the test was aborted before the eyes.close was called, end the test as
// aborted.
eyes.Abort();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment