assertNotNull("Expected a non null snippetId", snippetId);
resultsReady = false;
setSnippetId(snippetId);
setAuthType(authType);
ResultPage resultPage = environment.launchSnippet(this);
assertNotNull("Null result from snippet: " + snippetId, resultPage);
if (delay > 0) {
// optional delay to allow a test to return results
try {
Thread.sleep(delay);
} catch (InterruptedException ie) {
}
// TODO: this should not be necessary, investigate why is there
resultPage = environment.getPageObject(resultPage.getWebDriver());
}
return resultPage;
}