We use Selenium + Capybara + Firefox to run all our cucumber features. Recently, we decided to extend the tests to run in different locales and this post is a summary of the problems and the plausible solutions.
We had the following objectives in mind:
- Since, we run the tests in firefox, the test process should be capable of creating an appropriate profile with required locale settings
- The tests should be generic enough so that they don’t have to be written and maintained separately for every locale
The first step involves creating a new browser profile and switching the locale (italian in this case) and passing it on to the Capybara driver.
1 2 3 4 5 6 7 8 9 10 11
The advantage of creating a profile on-the-fly is that the tests do not require every machine to have a pre-configured firefox profile that has the necessary settings.Read on →