> ## Documentation Index
> Fetch the complete documentation index at: https://docs.proxylane.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Playwright

> Open a browser through your proxy using Playwright for Python.

Use these steps on **macOS or Linux** with Python 3 and a [generated connection](/quickstart). In ProxyLane, select **HTTP / HTTPS** under **Advanced options**. Use the same terminal throughout.

<Steps>
  <Step title="Install Playwright and Chromium">
    ```bash theme={null}
    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install playwright
    python -m playwright install chromium
    ```
  </Step>

  <Step title="Save this as browser_check.py">
    ```python theme={null}
    from getpass import getpass
    from playwright.sync_api import sync_playwright

    host = input("Host: ")
    port = input("Port: ")
    username = input("Username: ")
    password = getpass("Password: ")

    with sync_playwright() as p:
        browser = p.chromium.launch(proxy={
            "server": f"http://{host}:{port}",
            "username": username,
            "password": password,
        })
        page = browser.new_page()
        page.goto("https://api.ipify.org?format=json")
        print(page.text_content("body"))
        browser.close()
    ```
  </Step>

  <Step title="Run it and enter your details">
    ```bash theme={null}
    python browser_check.py
    ```

    Find each value using [your proxy details](/connection-settings). The password stays hidden while you enter it.

    The output should include an `ip` value. On the same computer, open [the IP check](https://api.ipify.org?format=json) in a browser with its proxy off. If the IPs match, check your proxy settings. Otherwise, try your intended website.
  </Step>
</Steps>

For JavaScript, open **Code examples → Playwright** in your dashboard. Keep credentials private.

[Fix an error](/troubleshooting) · [Get help](mailto:hello@proxylane.dev) · [Playwright proxy reference](https://playwright.dev/python/docs/network#http-proxy)
