Chromedriver set single accept language

I am using ChromeDriver with java and arquillian drone Framework to check the localization of our web page. To test the behavior of unsupported locales installed in the browser, we set the chromes locale using the command line argument:

--lang=it 

The resulting ACCEPT-LANGUAGE -header, however, is as follows:

 it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4 

Is there a way to keep chromeDriver from automatically resolving en_us and en ?

+5
source share
1 answer

If you use Python to execute your chrome grill instance, you can consider this point:

https://gist.github.com/BuhtigithuB/11df8cf8d03bb236985156de204fe7b4

And my answer is here:

WebDriver: how to specify preferred languages ​​for Chrome


UPDATE

Since you are specifying JAVA here is the gist that supposedly works for JAVA:

https://gist.github.com/c089/a5cbb834f9b54004de9b

+2
source

Source: https://habr.com/ru/post/1267175/


All Articles