LoginSignup
1
1

More than 5 years have passed since last update.

Specifying accept-language of browserstack

Last updated at Posted at 2014-11-14

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'
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1