Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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