Localization Testing using Selenium Webdriver is necessary when working with international web applications. We need to test those web apps in many different languages. Our test automation codes have to be run in each local chapter of the application or website. You can also think this as globalization testing as well. They are well described on here.

Localization Testing Real Life Scenario

Real Life Scenario: Sometimes, websites have an option to change its language independent from the browser’s language.  Some of them change the web app’s language according to the browser’s local settings.

Question: So how to change your browser’s language for multi-language tests in Selenium Webdriver?

Solution: All you need to do is to provide the necessary ChromeOptions or FirefoxOptions objects into your drivers.

localization testing

Chrome Driver Options

Firefox Driver Options

Language parameter can be:

enEnglish
deGerman
trTurkish
esSpanish

 
Happy multi-language testing in Selenium Webdriver projects. Now, you can do localization testing using Selenium Webdriver without any pain. 🙂

Thanks.
Canberk Akduygu