I managed to figure out the way to specify accept-language
only when using chrome as the browser.
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["chromeOptions"] = {}
caps["chromeOptions"]["args"] = ["--lang=ja"]
caps["browser"] = "chrome"
caps["browser_version"] = "21.0"
This also works for android/Samsung Galaxy S5 for some reason.
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["chromeOptions"] = {}
caps["chromeOptions"]["args"] = ["--lang=ja"]
caps[:browserName] = 'android'
caps[:platform] = 'ANDROID'
caps['device'] = 'Samsung Galaxy S5'