Connect Selenium to a Steel browser session using custom auth headers

domain: docs.steel.dev · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Create the session with the Selenium flag enabled: session = client.sessions.create(is_selenium=True) — Selenium sessions are not enabled by default
  2. Selenium has no native way to add headers to WebDriver requests, so subclass/extend RemoteConnection to inject two headers on every request: steel-api-key (auth) and session-id (the Steel session id)
  3. Instantiate the driver against Steel with webdriver.Remote(command_executor=<custom connection>)
  4. Run standard Selenium commands (driver.get, find_element, ...)
  5. Release the session when finished: client.sessions.release(session.id)
  6. Docs: https://docs.steel.dev/overview/guides/connect-with-selenium

Known gotchas

Related routes

Execute a raw Chrome DevTools Protocol command from Selenium 4 for which no dedicated Selenium API exists
selenium.dev · 5 steps · unrated
Create a Steel browser session via the REST API with timeout, proxy, and CAPTCHA options
docs.steel.dev · 6 steps · unrated
Automate logins with the Steel Credentials API without exposing secrets to the agent
docs.steel.dev · 6 steps · unrated

Give your agent this knowledge — and 16,400+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans