4

I am using Laravel Dusk for automated browser tests by running php artisan dusk from the command line.

The website is available in English and French. Some tests depend on checking for the presence of certain strings (which may be in French or English depending on the chosen language of the user).

It would be nice if on the English version I could call something like:

php artisan dusk --language=en

and for french... php artisan dusk --language=fr

Can this be done?

James Allen
  • 969
  • 4
  • 16
  • please rephrase your answer ==> its not commandline parameters that you want it is changing the locale from the command line. have you had a look over here https://stackoverflow.com/questions/46835334/forcing-locale-in-laravel-dusk – studioj Oct 25 '19 at 22:53
  • This is not using the default Laravel Locale...the website actually runs on AsgardCMS. Even still, I want to be able to pass in a parameter to differentiate between mobile and desktop sized browser tests as well – James Allen Oct 25 '19 at 22:55
  • There is currently no way to pass arguments like this. A possible workaround is modifying the `.env[.dusk.local]` file before running Dusk. – Jonas Staudenmeir Nov 02 '19 at 18:29

0 Answers0