Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class AndroidDronePointFilter implements DronePointFilter {
@Override
public boolean accept(DroneContext context, DronePoint<?> dronePoint) {
DronePointContext<?> dronePointContext = context.get(dronePoint);
if (dronePointContext.hasConfiguration() && dronePoint.conformsTo(WebDriver.class)) {
if (dronePointContext.isInstantiated()) {
if (dronePoint.conformsTo(AndroidDriver.class)) {
return true;
}
} else {
WebDriverConfiguration configuration = dronePointContext.getConfigurationAs(WebDriverConfiguration.class);
return configuration.getBrowser().equals("android");
}
}
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment