更改Safari语言设置的方法是通过Selenium WebDriver进行操作的。

huangapple 未分类评论44阅读模式
英文:

What is the setting for changing language in Safari through Selenium WebDriver?

问题

我正在尝试通过WebDriver更改Safari的默认语言。我知道在Chrome中可以这样做:

val chromeOptions = new ChromeOptions();
val prefs = new HashMap<String, String>();
prefs.put("intl.accept_languages", "fr-CA");
chromeOptions.setExperimentalOption("prefs", prefs);

如何在Safari中实现这一目标?

英文:

I'm trying to change the default language in Safari through WebDriver. I know this is the way in Chrome:

        val chromeOptions = new ChromeOptions();
        val prefs = new HashMap&lt;String, String&gt;();
        prefs.put(&quot;intl.accept_languages&quot;, &quot;fr-CA&quot;);
        chromeOptions.setExperimentalOption(&quot;prefs&quot;, prefs);

How can this be accomplished for Safari?

huangapple
  • 本文由 发表于 2020年7月24日 01:22:07
  • 转载请务必保留本文链接:https://java.coder-hub.com/63059805.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定