How to set browser language for chrome for localization testing
This post is regarding how to set browser language for localization testing
from command prompt, the localization test is major part of testing activities,
but set browser language and again reset
it sometimes become very complex task
for test team.
This blog teach you how to open chrome browser instance with desired
language without impacting main browser language or default browser language. Default
chrome browser language would remain same, only browser instance will open with
desired language.
In manual tests you can change browser language and after reset as well but
through automation it is tough task to change and reset browser language.
If you have developed automation suite and same suite want to execute on
different language this post help you to achieve the handle localization part.
How to change chrome browser language without access settings are explained
below with examples
- Copy the chrome browser location from file system or explorer, in my case it is (C:\Program Files (x86)\Google\Chrome\Application\chrome.exe)
- Open command prompt with administrator
- Type on Command prompt CD\ to get back from current directory
- Paste browser path on command prompt
- Add one space and type C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --lang=language abbreviation
- Press enter that you will redirected to browser instance with given language abbreviation.
In above example command prompt will open chrome browser instance with
German language. You can change language abbreviation to open instance in
changed language.
For example if you want to open browser instance with French language
you can follow below example
In above example browser instance will open with French language and that can be check by
clicking on customize and control google chrome option at top right side. For example
please check in below.
In Automation suite you can create multiple batch file for each browser
language and invoke that batch file to launch browser with specified language. Below
are steps to create batch file for open browser instance in specific language.
- Create batch file create batch file with extension (.bat)
- Set browser directory path and click enter
- In new line add code Chrome.exe –lang=DE “your application url”
In above example not need to reset browser language, also you can parameterize browser path, application url and language abbreviation.
Also you can watch below video for more details...
Also you can watch below video for more details...
If you have any
query regarding localization please comment below, please like and subscribe blog for more tricks in automation. happy learning
nice article :) good going all best for future articles :)
ReplyDeleteI have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! Chinese translation
ReplyDeleteSuch a nice blog Thanks for sharing information change language settings in Google Chrome
ReplyDeletePositive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. Feedback Analytics
ReplyDeleteI have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks!
ReplyDeletehow changes are handled