Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

0
How to change the language of the chrome browser in Selenium WebDriver?

Open 1 Answers 22 Views
0 1
I am doing localization testing. I would like to know how do I change the language of my chrome browser using Selenium WebDRiver?

1 Answer

0
0

Below is the syntax you can use for Chrome Browser :

System.setProperty("webdriver.chrome.driver","D:/.../chromedriver.exe");

ChromeOptions options = new ChromeOptions();

options.addArguments("-lang= sl");

ChromeDriver driver = new ChromeDriver(options);

driver.get("http://www.google.com);



Read more: https://softwaretestingboard.com/qna/2347/how-to-change-the-language-of-the-browser-selenium-webdriver#ixzz53Jwtn01s

answered by (822 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...