We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45512b6 commit 644bd6aCopy full SHA for 644bd6a
computers/playwright/playwright.py
@@ -13,6 +13,7 @@
13
# limitations under the License.
14
import termcolor
15
import time
16
+import os
17
import sys
18
from ..computer import (
19
Computer,
@@ -88,11 +89,9 @@ def __enter__(self):
88
89
print("Creating session...")
90
self._playwright = sync_playwright().start()
91
self._browser = self._playwright.chromium.launch(
- args=[
92
- '--disable-blink-features=AutomationControlled'
93
- ],
94
- headless=False,
95
- )
+ args=["--disable-blink-features=AutomationControlled"],
+ headless=bool(os.environ.get("PLAYWRIGHT_HEADLESS", False)),
+ )
96
self._context = self._browser.new_context(
97
viewport={
98
"width": self._screen_size[0],
0 commit comments