Forum Discussion
AlexanderM
Staff
15 years agoHello,
To retrieve the preferred language setting for the Firefox web browser, you can use the navigator.language property of the UIPage object (see the sample code snippet below).
As for Internet Explorer, you can retrieve its preferred language setting from the Windows registry. The setting is stored in the AcceptLanguage subkey of the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International registry key.
To retrieve it from your TestComplete tests, you can use the following code:
Let us know whether any of this helps.
To retrieve the preferred language setting for the Firefox web browser, you can use the navigator.language property of the UIPage object (see the sample code snippet below).
UIPage = Aliases.firefox.UIPage;
language = UIPage.navigator.language;
As for Internet Explorer, you can retrieve its preferred language setting from the Windows registry. The setting is stored in the AcceptLanguage subkey of the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International registry key.
To retrieve it from your TestComplete tests, you can use the following code:
key = Storages.Registry("Software\\Microsoft\\Internet Explorer\\International", HKEY_CURRENT_USER);
language = key.GetOption("AcceptLanguage", "undefined");
Let us know whether any of this helps.