mercredi 27 février 2019

How to set the browser language using Selenium for Safari, IE and Edge browser?

I understand you can set the browser language using browser options. For instance-

On Firefox-

FirefoxProfile fp = new FirefoxProfile();
fp.setPreference("intl.accept_languages", "en-gb");
caps.setCapability(FirefoxDriver.PROFILE,fp);

On Chrome-

ChromeOptions options = new ChromeOptions();
options.addArguments("--lang=en-gb");
caps.setCapability(ChromeOptions.CAPABILITY,options);

How can I achieve the same for Safari, IE and Edge browser using Selenium?

I could not find official documentation around this!

Aucun commentaire:

Enregistrer un commentaire