Playwriter.WindowsBrowserAdapter (Playwriter v0.0.2)
View SourceAdapter for connecting to Windows browsers from WSL using Playwright's WebSocket transport.
This module provides utilities to:
- Automatically start a Playwright server on Windows if needed
- Connect to it from WSL
- Use Windows Chrome/Firefox browsers from your Elixir app in WSL
No manual setup required - everything is handled automatically!
Summary
Functions
Connects to a Windows browser via WebSocket.
Enhanced fetch function that uses Windows browsers.
Lists available Chrome profiles on Windows.
Gets the Windows host IP address from WSL.
Starts a Playwright server on Windows and returns the WebSocket endpoint.
Functions
Connects to a Windows browser via WebSocket.
Examples
# Connect to Chrome on Windows
{:ok, browser} = Playwriter.WindowsBrowserAdapter.connect_windows_browser(:chromium)
# Connect to Firefox on Windows
{:ok, browser} = Playwriter.WindowsBrowserAdapter.connect_windows_browser(:firefox)
Enhanced fetch function that uses Windows browsers.
Lists available Chrome profiles on Windows.
Gets the Windows host IP address from WSL.
Starts a Playwright server on Windows and returns the WebSocket endpoint.
This uses PowerShell to execute commands on the Windows side.