Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: specify client's locale in tests #900

Closed
nkbt opened this issue Mar 15, 2016 · 3 comments
Closed

Feature: specify client's locale in tests #900

nkbt opened this issue Mar 15, 2016 · 3 comments

Comments

@nkbt
Copy link

nkbt commented Mar 15, 2016

I want to be able to set browser's locale for some of the tests to check that i18n works fine. I could not find any way to do so neither through Nightwatch nor Selenium.

I could do it by sending some arbitrary headers, but also could not find the way to do so.

Is it even possible? Feel free to close the case if not really, thank you!

@beatfactor
Copy link
Member

There isn't a way to send headers from Nightwatch in a UI test.

One way you could do this in Firefox is to create a specific profile and specify the language (go into about:config and set intl.accept_languages). Then pass the name of the profile in nightwatch.json (see http://nightwatchjs.org/guide#selenium-settings).

@nkbt
Copy link
Author

nkbt commented Mar 15, 2016

Thanks 👌
On Tue, 15 Mar 2016 at 8:10 PM, Andrei Rusu notifications@github.com
wrote:

There isn't a way to send headers from Nightwatch in a UI test.

One way you could do this in Firefox is to create a specific profile and
specify the language (go into about:config and set intl.accept_languages).
Then pass the name of the profile in nightwatch.json (see
http://nightwatchjs.org/guide#selenium-settings).


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:

#900 (comment)

@DATADEER
Copy link

Setup custom language in ChromeDriver with Nightwatchjs config
https://gist.github.com/DATADEER/51da97498c03c804d75f4b3828cedb8c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants