Skip to main content
Read the Notte skill and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
Notte sessions expose a Chrome DevTools Protocol (CDP) endpoint that you can connect to with Puppeteer. You can start the session with the Notte Node.js SDK, the Python SDK, or the REST API, then hand its CDP URL to Puppeteer.

Prerequisites

Install Puppeteer and the Notte SDK in your Node.js project:
Use puppeteer-core instead of puppeteer since you’re connecting to a remote browser rather than launching a local one.

Approach 1: Start Session with the Node.js SDK

Start a Notte session with the Node.js SDK, get its CDP URL with session.cdpUrl(), and connect Puppeteer. session.use() stops the session when the callback finishes:

Approach 2: Start Session from Python

Start a Notte session in Python and pass its CDP URL to a Node.js Puppeteer script:

Network Interception

Use Puppeteer’s request interception with Notte sessions:

Page Manipulation

Use Puppeteer’s API for advanced page interactions:

Multiple Pages

Create and manage multiple pages with Puppeteer:

Event Monitoring

Listen to browser events using Puppeteer:

Screenshots and PDFs

Generate screenshots and PDFs using Puppeteer:

Best Practices

1. Use puppeteer-core

Always use puppeteer-core instead of puppeteer since you’re connecting to a remote browser:

2. Handle Disconnections

CDP connections can be interrupted. Always wrap operations in try-catch:

3. Disconnect Properly

Always disconnect the browser when done:

4. Session Timeout

Remember that Notte sessions have a timeout. Set an appropriate value when creating the session:
puppeteer_session_timeout.py

5. Environment Variables

Store your Notte API key in environment variables:

Complete Example: Web Scraping

Here’s a complete example that drives the REST API directly, without an SDK. Sessions are started with POST /sessions/start and stopped with DELETE /sessions/{session_id}/stop:

When to Use Puppeteer with Notte

Use Puppeteer directly when you need:
  • Node.js ecosystem: Integrate with Node.js applications and packages
  • Familiar Puppeteer API: You’re already comfortable with Puppeteer’s API
  • Request interception: Block resources or modify requests
  • Performance monitoring: Track page metrics and performance
  • PDF generation: Create PDFs from web pages
For Python-based automation, consider using Playwright with Notte instead, as it has better Python integration.

Next Steps

Connect with Playwright

Use Playwright with Notte sessions

Migrating from Selenium

Port Selenium scripts to Playwright

External Browser Providers

Connect Notte to Kernel.sh and other providers

API Reference

Explore the Notte REST API