title: Custom profile for Chrome
body: <p>Environment: Mac OS X 10.8.3, Ruby 2.0.0p0, selenium-webdriver 2.32.1, ChromeDriver 26.0.1383.0.</p>
  
  <p>I want to change default browser language. I am testing if the site detects the browser language correctly and displays the pages in the language.</p>
  
  <p>I was able to set Firefox language to German:</p>
  
  <pre><code>require "selenium-webdriver"
  
  profile = Selenium::WebDriver::Firefox::Profile.new 
  profile["intl.accept_languages"] = "de"
  
  caps = Selenium::WebDriver::Remote::Capabilities.firefox(firefox_profile: profile) 
  caps.platform = "Linux" 
  caps.version = 20
  
  driver = Selenium::WebDriver.for( 
  :remote, 
  url: "http://USERNAME:ACCESS-KEY@ondemand.saucelabs.com:80/wd/hub", 
  desired_capabilities: caps)
  
  driver.navigate.to "http://sandbox.translatewiki.net/"
  </code></pre>
  
  <p>I want to do the same using Chrome (and other browsers, if possible).</p>
  
  <p>I have tried several things trying to open the page in German in Chrome, but every time the page is displayed in English, instead of in German.</p>
  
  <pre><code>require "selenium-webdriver"
  
  profile = Selenium::WebDriver::Chrome::Profile.new 
  profile["intl.accept_languages"] = "de"
  
  caps = Selenium::WebDriver::Remote::Capabilities.chrome(firefox_profile: profile) 
  caps.platform = "Linux" 
  caps.version = ""
  
  driver = Selenium::WebDriver.for( 
  :remote, 
  url: "http://USERNAME:ACCESS-KEY@ondemand.saucelabs.com:80/wd/hub", 
  desired_capabilities: caps)
  
  driver.navigate.to "http://sandbox.translatewiki.net/"
  </code></pre>
  
  <p>If I change <code>firefox_profile: profile</code> to <code>profile: profile</code> or <code>chrome_profile: profile</code>, the page opens in English (instead of in German) every time.</p>
  
  <p>As far as I can see in the <a href="http://selenium.googlecode.com/svn/trunk/docs/api/rb/Selenium/WebDriver/Remote/Capabilities.html" rel="nofollow">API docs</a>, only <code>:firefox_profile</code> is supported.</p>
  
  <p>I was able to do it on a <a href="http://filipin.eu/2013/04/19/chrome-profiles.html" rel="nofollow">local machine</a>, but not when using Sauce Labs.</p>