Skip to main content
Selenium talks to a Surfsky browser over HTTP through a ChromeDriver that runs next to it. Start the browser with enable_chromedriver: true (the default is false). No local ChromeDriver or Chrome is needed.
ChromeDriver can leave script artifacts that detection scripts identify. For sites with bot protection, use a patched fork of Playwright or Puppeteer, or use a Surfsky SDK.

Prerequisites

Set your API token and base URL, then install the packages:
Other than enable_chromedriver, the example uses default start options, including your account’s default proxy pool. Proxy, fingerprint, and other options are in the API reference.

Run an example

The example starts a one-time browser, connects, opens a page, prints its title, and stops the session. To keep cookies and login state between runs, start a persistent profile instead; the connection code is the same. Save as surfsky_selenium.py:
Expected output:

Connection settings

Use /chromedriver/{internal_uuid} as command_executor, not the CDP ws_url. The URL grants access to the browser, so keep it private. Do not pass local launch arguments for proxy or fingerprint; those are set in the start request. chromedriver_not_enabled means the browser was started without the flag.

Stop the session

driver.quit() ends the WebDriver session but leaves the browser running, because ChromeDriver attached to a browser it did not launch. Stop the session through the API with the internal_uuid from the start response, as the example does:
Otherwise the browser stops after the inactivity timeout, 30 seconds by default.