Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion skills/webwright/reference/playwright_patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ the first task.
python - <<'PY'
import asyncio
import os
import sys
from pathlib import Path

# Force UTF-8 stdout to avoid UnicodeEncodeError on Windows (cp1252)
sys.stdout.reconfigure(encoding="utf-8")

from playwright.async_api import async_playwright

WORKSPACE = Path(os.environ.get("WORKSPACE_DIR", "."))
Expand Down Expand Up @@ -127,8 +131,12 @@ Guidelines for the interactive path:
- print the final datum at the end of the log.

```python
import asyncio, os
import asyncio, os, sys
from pathlib import Path

# Force UTF-8 stdout to avoid UnicodeEncodeError on Windows (cp1252)
sys.stdout.reconfigure(encoding="utf-8")

from playwright.async_api import async_playwright

RUN_DIR = Path(__file__).parent
Expand Down