How to change language in web page using Selenium(Java)?
How to change language in web page using Selenium(Java)?
Is their a way to pre-define a language for webpage? I want to load google page in Spanish, can we set property of webdriver in such a way that it load the page in Spanish.
Can i set the browser property to load pages in particular language..
– Nick
Apr 22 '15 at 6:05
1 Answer
1
Check this link:
For Firefox:
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference( "intl.accept_languages", "es" );
WebDriver driver = new FirefoxDriver(profile);
For Chrome:
ChromeOptions options = new ChromeOptions();
options.AddArguments("--lang=es");
ChromeDriver driver = new ChromeDriver(options);
I thought there was nothing like that ... deleted my comment
– 0o'-Varun-'o0
Apr 22 '15 at 6:29
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What the URL you are using? I think you can just use this URL: google.es
– igreenfield
Apr 22 '15 at 5:32