Skip to main content
Selenium talks to a Surfsky browser over HTTP, through a ChromeDriver that runs next to it in the cloud. You do not need a local ChromeDriver or Chrome.
ChromeDriver has known leaks that anti-bot scripts can detect. On sites with bot protection, use a patched fork of Playwright or Puppeteer, or a Surfsky SDK.
Use human-emulation commands for clicks, typing, and scrolling. Keep Selenium for navigation, selectors, waiting, and page content.

Prerequisites

Set your API token and base URL, then install the packages for your language below. 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 examples use a one-time profile. To reuse a saved login, pass a persistent profile UUID to the session call, keeping enable_chromedriver on.
Requires Python 3.12 or newer. Selenium’s Python API is synchronous, so use the synchronous Surfsky client:
Save as surfsky_selenium.py:
Run it:
Expected output:

Click, type, and scroll

Prefer human emulation over Selenium’s click, send_keys, and action chains. Human.* commands move the cursor and type with human timing, and they go through ChromeDriver. Replace the selector with an input on your page:

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. The SDK stops it when the session scope exits, including on errors. Without the SDK, stop the browser through the API:
Otherwise the browser stops after the inactivity timeout.