Sabiha
4 years agoOccasional Contributor
Detecting and changing current browser language setting in scripts in TestComplete
Hi,
We are currently adding localisation support for our application. I would like to create a suite of tests to test the localisation has been implemented correctly. Currently we have 3 suites of tests that run on Edge, Firefox and Chrome.
I would like to be able to detect and set the language on on each browser before running my suite of tests. Is there a way to do this?
I have tried the following but this is returning the system locale, not the language set on the browser.
aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLOCALIZEDLANGUAGENAME)
aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SLOCALIZEDDISPLAYNAME);
Any help much appreciated, thanks.