I am executing tests through Chrome, FF and IE. I just added IE support however some pages change their language when I browse them through IE.
I am trying to force IE to prefer English, however I don't see any matching property in InternetExplorerOptions class, additionaly there is no InternetExplorerProfile class like for Firefox.
Question: How to force IE to prefer English by Selenium or other programmatical ways?
As far as I know, Internet Explorer does not independently control its language selections. Although you can launch the Language settings app through IE 11's menus, the operating system itself controls the language.
So, I think we can't set the preferred language in selenium for IE browser. if we want to set the default Language in IE browser, we have to change it manually. Please refer to the following steps:
Open Internet Explorer, Click Tools ,Click Internet Options, Click Languages, under the General tab.
Then, click the Set Language Preferences. It will open the Windows setting window.
From within the Language Preference section, select the language you would like to have priority Click Move up repeatedly until the language is displayed at the top of the list. Then, Click OK and restart the IE browser.