if (!dronePoint.conformsTo(WebDriver.class)) {
// This Drone is not instance of WebDriver, we will not resize the window
return;
}
DroneContext context = droneContext.get();
WebDriver driver = context.get(dronePoint).getInstanceAs(WebDriver.class);
// let's get browser configuration
Validate.stateNotNull(context, "DroneContext must not be null");
WebDriverConfiguration configuration = context.get(dronePoint).getConfigurationAs(WebDriverConfiguration.class);
Validate.stateNotNull(configuration, "WebDriver configuration must not be null");
String dimensions = configuration.getDimensions();
if (dimensions != null) {