Skip to content

Commit def06ac

Browse files
Add playwright launch flags. (#42)
* Add playwright launch flags. * Remove disable-blink-features flag.
1 parent 5d7983b commit def06ac

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

computers/playwright/playwright.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,16 @@ def __enter__(self):
101101
print("Creating session...")
102102
self._playwright = sync_playwright().start()
103103
self._browser = self._playwright.chromium.launch(
104-
args=["--disable-blink-features=AutomationControlled"],
104+
args=[
105+
"--disable-extensions",
106+
"--disable-file-system",
107+
"--disable-plugins",
108+
"--disable-dev-shm-usage",
109+
"--disable-background-networking",
110+
"--disable-default-apps",
111+
"--disable-sync",
112+
# No '--no-sandbox' arg means the sandbox is on.
113+
],
105114
headless=bool(os.environ.get("PLAYWRIGHT_HEADLESS", False)),
106115
)
107116
self._context = self._browser.new_context(

0 commit comments

Comments
 (0)