Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium chromedriver 如何使用Playwright更改默认语言Chromium/Firefox?_Selenium Chromedriver_Cross Browser_Geckodriver_Playwright_Codeceptjs - Fatal编程技术网

Selenium chromedriver 如何使用Playwright更改默认语言Chromium/Firefox?

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.

我一直试图将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-全打印屏幕

剧作家:{
url:process.env.baseUrl | |默认主机,
秀:没错,
浏览器:“铬”,
等待行动:250,
waitForNavigation:'networkidle0',
铬:{
频道:process.env.BROWSER,
args:['--lang=fr CA'],
首选项:{
“国际语言”:“fr CA”,
},
firefoxUserPrefs:{
“国际语言”:“fr-CA,fr”,
},
},
}, 
有一个名为
locale
的选项。您可以使用该选项更改语言