@Test void testOtherExceptionsAreNotIgnored() { Fixture fixture = new Fixture(); SimpleUnhandledAlertHandler handler = new SimpleUnhandledAlertHandler(); fixture.alertHandlingDriver.registerAlertHandler(handler); when(fixture.mockedDriver.getTitle()).thenThrow(new WebDriverException()); assertThrows(WebDriverException.class, () -> fixture.driver.getTitle()); }
public void registerAlertHandler(UnhandledAlertHandler handler) { handlers.add(handler); }
UnhandledAlertHandlingWebDriver extends DecoratedWebDriver { public void registerAlertHandler(UnhandledAlertHandler handler) { handlers.add(handler); } }
UnhandledAlertHandlingWebDriver extends DecoratedWebDriver { public void registerAlertHandler(UnhandledAlertHandler handler) { handlers.add(handler); } UnhandledAlertHandlingWebDriver(final WebDriver driver); }
UnhandledAlertHandlingWebDriver extends DecoratedWebDriver { public void registerAlertHandler(UnhandledAlertHandler handler) { handlers.add(handler); } UnhandledAlertHandlingWebDriver(final WebDriver driver); void registerAlertHandler(UnhandledAlertHandler handler); @Override Object onErrorGlobal(Decorated<?> target, Method method, InvocationTargetException e, Object[] args); }
UnhandledAlertHandlingWebDriver extends DecoratedWebDriver { public void registerAlertHandler(UnhandledAlertHandler handler) { handlers.add(handler); } UnhandledAlertHandlingWebDriver(final WebDriver driver); void registerAlertHandler(UnhandledAlertHandler handler); @Override Object onErrorGlobal(Decorated<?> target, Method method, InvocationTargetException e, Object[] args);  }