Con*_*oid 9 cross-browser selenium-chromedriver codeceptjs geckodriver playwright
我\xe2\x80\x99一直在尝试将浏览器Chromium和Firefox的默认语言(在使用CodeceptJS + Playwright作为运行器并行运行的自动化测试中)更改为法语,但没有成功。在Chromium中,我\xe2\x80\x99ve尝试使用args --lang但没有成功,并且我\xe2\x80\x99ve也尝试使用prefs:intl.accept_languages。在 Firefox 中,我尝试使用 firefoxUserPrefs。到目前为止,没有任何效果。\n有人知道如何更改使用 playwright 启动的浏览器中的默认语言吗?
\nCodeceptJS 版本 3.0.6
\n剧作家版本1.10.0
\nChrome 版本 90.0.4430.0
\n火狐版本 87.0b10
\ncodecept.conf.js - 完整打印屏幕\n codecept.conf.js
\nPlaywright: {\n url: process.env.baseUrl || DEFAULT_HOST,\n show: true,\n browser: \'chromium\',\n waitForAction: 250,\n waitForNavigation: \'networkidle0\',\n chromium: { \n channel: process.env.BROWSER,\n args: [\'--lang=fr-CA\'],\n prefs: {\n \'intl.accept_languages\': \'fr-CA\',\n },\n firefoxUserPrefs: {\n \'intl.accept_languages\': \'fr-CA, fr\',\n },\n },\n}, \nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
10865 次 |
| 最近记录: |