Skip to content

Instantly share code, notes, and snippets.

@kpiwko
Forked from smiklosovic/gist:9970308
Created April 4, 2014 11:19
Show Gist options
  • Save kpiwko/9972561 to your computer and use it in GitHub Desktop.
Save kpiwko/9972561 to your computer and use it in GitHub Desktop.
public void removeAllActivitiesForDrone(@Observes BeforeDroneDestroyed event) {
InjectionPoint<?> injectionPoint = event.getInjectionPoint();
if (WebDriver.class.isAssignableFrom(injectionPoint.getDroneType())) {
WebDriverConfiguration configuration = droneContext.get()
.getDroneConfiguration(injectionPoint, WebDriverConfiguration.class);
if (configuration.getBrowser().equals("android")) {
activityWebDriverMapper.get().removeActivities((WebDriver) drone);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment