How to set Chrome’s language using JS-Nighwatch?
Hi Richard,
To set the language forcefully on javascript, the script below can be used:
await page.evaluateOnNewDocument(() => {
Object.defineProperty(navigator, "language", {
get: function() {
return "bn-BD";
}
});
Object.defineProperty(navigator, "languages", {
get: function() {
return ["bn-BD", "bn"];
}
});
});