Selenium chromedriver 如何使用Playwright更改默认语言Chromium/Firefox?
我一直试图将Chromium和Firefox浏览器的默认语言(在使用CodeceptJS+Playwright作为运行者并行运行的自动测试中)更改为法语,但没有成功。在Chromium中,我尝试使用args--lang但没有成功,我还尝试使用prefs:intl.accept_语言。在Firefox中,我尝试使用firefoxUserPrefs。直到现在,一切都不起作用。 有人知道如何在使用playwright启动的浏览器中更改默认语言吗 CodeceptJS版本3.0.6 剧作家版本1.10.0 Chrome版本90.0.4430.0 Firefox版本87.0b10 codecept.conf.js-全打印屏幕Selenium chromedriver 如何使用Playwright更改默认语言Chromium/Firefox?,selenium-chromedriver,cross-browser,geckodriver,playwright,codeceptjs,Selenium Chromedriver,Cross Browser,Geckodriver,Playwright,Codeceptjs,我一直试图将Chromium和Firefox浏览器的默认语言(在使用CodeceptJS+Playwright作为运行者并行运行的自动测试中)更改为法语,但没有成功。在Chromium中,我尝试使用args--lang但没有成功,我还尝试使用prefs:intl.accept_语言。在Firefox中,我尝试使用firefoxUserPrefs。直到现在,一切都不起作用。 有人知道如何在使用playwright启动的浏览器中更改默认语言吗 CodeceptJS版本3.0.6 剧作家版本1.10.
剧作家:{
url:process.env.baseUrl | |默认主机,
秀:没错,
浏览器:“铬”,
等待行动:250,
waitForNavigation:'networkidle0',
铬:{
频道:process.env.BROWSER,
args:['--lang=fr CA'],
首选项:{
“国际语言”:“fr CA”,
},
firefoxUserPrefs:{
“国际语言”:“fr-CA,fr”,
},
},
},
有一个名为locale
的选项。您可以使用该选项更改语言