Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(chrome-extensions) update headless testing docs (#20643)

Boris Osipov494497abbfe4
diff --git a/docs/src/chrome-extensions-js-python.md b/docs/src/chrome-extensions-js-python.md
index 94918417d4..93a993d301 100644
--- a/docs/src/chrome-extensions-js-python.md
+++ b/docs/src/chrome-extensions-js-python.md
@@ -224,7 +224,7 @@ const pathToExtension = path.join(__dirname, 'my-extension');
const context = await chromium.launchPersistentContext('', {
headless: false,
args: [
- `--headless=chrome`, // the new headless arg
+ `--headless=new`, // the new headless arg for chrome v109+. Use '--headless=chrome' as arg for browsers v94-108.
`--disable-extensions-except=${pathToExtension}`,
`--load-extension=${pathToExtension}`,
],
@@ -237,11 +237,11 @@ const context = await chromium.launchPersistentContext('', {
path_to_extension = Path(__file__).parent.joinpath("my-extension")
context = playwright.chromium.launch_persistent_context(
"",
- headless=False,
+ headless=False,
args=[
- "--headless=chrome", # the new headless arg
+ "--headless=new", # the new headless arg for chrome v109+. Use '--headless=chrome' as arg for browsers v94-108.
f"--disable-extensions-except={path_to_extension}",
f"--load-extension={path_to_extension}",
],
)
-```
\ No newline at end of file
+```