/** Creates new JSF session, using JoprLoginStrategy. */
public SessionInstance(String user, String pass) throws IOException {
// Code taken from EmbJoprTestCase.java.
// Initial JSF request
WebClientSpec wcSpec = new WebClientSpec("/", BrowserVersion.FIREFOX_3);
wcSpec.getWebClient().setThrowExceptionOnFailingStatusCode(false);
wcSpec.getWebClient().setConfirmHandler(new SimpleConfirmHandler(true));
wcSpec.setInitialRequestStrategy(new JoprLoginStrategy(user, pass)); // logs in
this.jsfSession = new JSFSession(wcSpec);
this.client_ = jsfSession.getJSFClientSession();
this.server_ = jsfSession.getJSFServerSession();
}