https://sites.google.com/a/chromium.org/chromedriver/capabilities
Capabilities are options that you can use to customize and configure a ChromeDriver session. This page documents all ChromeDriver supported capabilities and how to use them.
有2种方法来指定capabilities.
1.使用ChromeOptions class.
2.如果客户端的library没有ChromeOptions class (ruby client没有),可以通过DesiredCapabilities 来直接指定capabilities.
一、用ChromeOptions class
实例化一个ChromeOptions, 之后直接传入ChromeOptions到ChromeDriver constructor.
//实例化一个ChromeOptions
ChromeOptions options = new ChromeOptions();
//安装一个插件
options.addExtensions(new File("/path/to/extension.crx"