I'm using the code below to start chrome using webdriver (selenium 2)
Map<String, String> mobileEmulation = new HashMap<String, String>();
mobileEmulation.put("deviceName", "BlackBerry PlayBook");
Map<String, Object> chromeOptions = new HashMap<String, Object>();
chromeOptions.put("mobileEmulation", mobileEmulation);
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
driver = new ChromeDriver(capabilities);
How can I also load a Chrome extension while also keeping the options above?