Skip to content

Instantly share code, notes, and snippets.

@rgr2k
Created August 13, 2012 16:15
Show Gist options
  • Select an option

  • Save rgr2k/3342267 to your computer and use it in GitHub Desktop.

Select an option

Save rgr2k/3342267 to your computer and use it in GitHub Desktop.
Chrome Driver PT-BR
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver","/home/rgr/chromedriver");
ChromeOptions options = new ChromeOptions();
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
Map<String, String> chromePrefs = new HashMap<String,String>();
chromePrefs.put("settings.language.preferred_languages", "pt-BR");
capabilities.setCapability("chrome.prefs", chromePrefs);
WebDriver driver = new ChromeDriver(capabilities);
driver.get("http://www.google.com");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment