Use the locally installed browser.
This plugin supports the following option:
name(defaultBrowserType.name()): Executable name.
Use the plugin with default options.
import { chromium } from "playwright-ghost";
import plugins from "playwright-ghost/plugins";
const browser = await chromium.launch({
plugins: [plugins.utils.locale()],
});
// ...Use the plugin and replace Chromium by Chrome (locally installed).
import { chromium } from "playwright-ghost";
import plugins from "playwright-ghost/plugins";
const browser = await chromium.launch({
plugins: [plugins.utils.locale({ name: "google-chrome" })],
});
// ...If you want to import only this plugin, you can use the
"playwright-ghost/plugins/utils/locale" path in the import.
import { chromium } from "playwright-ghost";
import utilsLocalePlugin from "playwright-ghost/plugins/utils/locale";
const browser = await chromium.launch({
plugins: [utilsLocalePlugin()],
});
// ...