Skip to content

Instantly share code, notes, and snippets.

@craigrbruce
Last active August 29, 2015 14:05
Show Gist options
  • Save craigrbruce/d9b31158304ca4ebeb8b to your computer and use it in GitHub Desktop.
Save craigrbruce/d9b31158304ca4ebeb8b to your computer and use it in GitHub Desktop.
@Test
public void test() {
running(testServer(3333, fakeApplication(inMemoryDatabase())), org.openqa.selenium.phantomjs.PhantomJSDriver.class, new Callback<TestBrowser>() {
public void invoke(TestBrowser browser) {
browser.goTo("http://www.google.com");
//test presence of stuff.
browser.takeScreenShot("/tmp/screenshot.jpg");//could be stored in a doco db
}
});
}
@craigrbruce
Copy link
Author

found this test on the interwebs... could be moulded to an all purpose screen shot utility. Not cosy with selenium referenced in prod code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment