Skip to content
Advertisement

How can i set browser language in Selenide using Java?

Hello guys please how can i do it?When i run not headless mode browser is in english and everything works fine, but when i run headless mode language is changed to my native language.

I am using this for headless mode.

JavaScript

Advertisement

Answer

Selenide Configuration class contains

public static MutableCapabilities browserCapabilities which used within the driver startup if provided.

For Chrome:

JavaScript

But note --lang argument might be ignored on Linux.

For Firefox:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement