I\'m trying to test my website with selenium but I don\'t manage to change the language of the browser. I tried with firefox, changing the profile also but it\'s not working.
FIREFOX JAVA
Java code for changing the language to English:
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("intl.accept_languages", "en-GB");
FirefoxOptions options = new FirefoxOptions();
options.setProfile(profile);
driver = new FirefoxDriver(options);
CHROME JAVA
Java code for changing the language to English:
ChromeOptions options = new ChromeOptions();
options.addArguments("lang=en-GB");
driver = new ChromeDriver(options);
FIREFOX PYTHON
options = Options()
profile = webdriver.FirefoxProfile()
profile.set_preference('intl.accept_languages', 'en-GB')
browser = webdriver.Firefox(options=options,firefox_profile=profile)