Forum Discussion
Hi Sabiha -
How is it that you are currently detecting and setting the language at this time? This will help me understand how you may be able to do so in TestComplete.
Also, here is a thread on some ways to check that information, maybe one of these methods could be integrated into a TestComplete script.
https://stackoverflow.com/questions/673905/best-way-to-determine-users-locale-within-browser
Thanks,
Emma
- Sabiha3 years agoOccasional Contributor
Hi Emma,
I am not doing anything with the language settings currently, as I haven't needed to access them up until now. I am just trying to figure out the best way to do this in a script.
I have just tried the navigator.languages mentioned in the link but I am getting an error saying 'cannot read property 'language' of undefined'
My test scripts are written in Javascript, is there something additional I need to do to access the navigator.language property?
- Marsha_R3 years agoChampion Level 3
Here are some details about changing browser settings in scripts. You'll see the note in there that Chrome security doesn't allow this kind of change, but it should at least work in Firefox.
- Sabiha3 years agoOccasional Contributor
Thanks Marsha,
I have managed to get the languages on Firefox using the Preferences.intl.accept_languages
Does anyone know how I do the same on Chrome and Edge?