Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class AndroidDronePointFilter implements DronePointFilter {
public boolean accept(DroneContext context, DronePoint<?> dronePoint) {
DronePointContext<?> dronePointContext = context.get(dronePoint);
if (dronePointContext.hasConfiguration() && dronePoint.conformsTo(WebDriver.class)) {
if (dronePointContext.isInstantiated()) {
return dronePointContext.getInstanceAs(WebDriver.class) instanceof AndroidDriver;
} 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