@Test public void shouldGetMeaningfulExceptionOnBrowserDeath() { ConnectionCapturingDriver driver2 = new ConnectionCapturingDriver(); driver2.get(pages.formPage); try { driver2.keptConnection.quit(); driver2.get(pages.formPage); fail("Should have thrown."); } catch (UnreachableBrowserException e) { assertThat( "Must contain descriptive error", e.getMessage(), containsString("Error communicating with the remote browser")); } }