title: How to get chromeOptions value from remote webdriver capabilities?
body: <p>Once start the test run, remote web-driver has initialized for the given capabilities:</p>
  
  <p>Below is the selenium node log:[Here I am setting some chrome options]</p>
  
  <pre><code>19:16:08.245 INFO - Creating a new session for Capabilities [{browserName=chrome, takesScreenshot=true, chromeOptions={mobileEmulation={deviceMetrics={pixelRatio=2, width=768, height=1024}, userAgent=Mozilla/5.0 (iPad; CPU OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4}, args=[--ignore-certificate-errors, --disable-bundled-ppapi-flash, --disable-extensions, --disable-web-security, --always-authorize-plugins, --allow-running-insecure-content, --test-type, --enable-npapi], extensions=[]}, version=,platform=ANY}]
  </code></pre>
  
  <p>Depends on my requirement I can able to set chrome options in the remote webdriver capabilities. but couldn't get those values. </p>
  
  <p>I need to get <code>deviceMetrics</code> and <code>userAgent</code> values from the desired capabilities?</p>
  
  <p>I tried with::</p>
  
  <pre><code>String chromeoptions= ((RemoteWebDriver) driver).getCapabilities().getCapability(ChromeOptions.CAPABILITY);
  </code></pre>
  
  <p>Getting <code>null</code> value in the chromeoptions.</p>