Reputation: 9082
I am trying to change the locale of my Chrome Webdriver I use in my Geb tests. My Chrome is normally running using a en
locale. For some tests I need to request a german version of a website.
Here is what I did in my GebConfig.groovy
.
//GebConfig.groovy
driver = {
ChromeOptions options = new ChromeOptions()
options.addArguments("--lang=de")
options.addArguments("--start-maximized")
new ChromeDriver(options)
}
The option --lang=de
does not seem to affect the chrome during the test, since the website still responds with english content.
Am I missing something?
Upvotes: 2
Views: 855
Reputation: 762
As you noted in a comment above, it will use the system locale. We struggled with this same problem and ended up having to setup a VM specifically for foreign language testing and update the display language via the Region and Language dialog (Control Panel-> Region and Language-> Keyboards and Languages.)
We found all of the language packs we needed here: http://winaero.com/blog/download-official-mui-language-packs-for-windows-8-1-windows-8-and-windows-7/
Upvotes: 3