Skip to main content

Basic Connection Example

After creating a browser session with MarinaBox, you can connect to it using Playwright. This guide shows you how to write a simple script to connect and interact with the browser session.

Getting Session Details

First, list your active sessions to get the WebSocket URL:
You’ll see output like this:

Python Script

Here’s a complete example showing how to connect to the session:
That’s it! This script:
  1. Connects to your running browser session
  2. Opens a new page
  3. Navigates to a website
  4. Closes the connection
You can use this as a starting point for more complex browser automation tasks.

Get Support & Join Our Community