return SecurityActions.newInstance(configuration.getImplementationClass(), new Class<?>[0], new Object[0],
ChromeDriver.class);
}
// set capabilities
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
// binary was set, so set the capability
if (Validate.nonEmpty(binary)) {
Validate.isExecutable(binary, "Chrome binary must point to an executable file, " + binary);
// set path to chrome
capabilities.setCapability("chrome.binary", binary);
}
if (Validate.nonEmpty(chromeSwitches)) {
capabilities.setCapability("chrome.switches", getChromeSwitches(chromeSwitches));
}
return SecurityActions.newInstance(configuration.getImplementationClass(), new Class<?>[] { Capabilities.class },
new Object[] { capabilities }, ChromeDriver.class);
}