Cuprite runs Capybara feature specs against headless Chrome or Chromium without Selenium or ChromeDriver. It uses Ferrum and the Chrome DevTools Protocol under the hood.
Overview
Cuprite is a Ruby gem that registers as Capybara’s JavaScript driver so integration tests drive a real Chrome-based browser in headless mode. It avoids Selenium, WebDriver, and ChromeDriver dependencies by speaking to the browser through Ferrum’s CDP-based API.
Test setups add the gem, require the Capybara adapter, and assign Cuprite as the JavaScript driver. Ferrum exposes low-level page controls for screenshots, PDF capture, cookies, network traffic inspection, request headers, proxy configuration, and precise mouse clicks.
Cuprite adds options for URL allowlists and blocklists, mobile device emulation, modal handling, and debugging hooks that open a visible browser mid-test with an optional console. Container deployments can disable Chrome’s sandbox through documented Ferrum flags when running as root.
The driver targets teams already using Capybara who want faster, lighter browser automation tied directly to Chromium rather than a separate driver binary.
Key features
- Capybara JavaScript driver
- Headless Chrome via CDP
- No Selenium or ChromeDriver
- Network traffic inspection
- URL blocklist and allowlist
- Mid-test debug with headful Chrome
- Device emulation options
- Cookie and header manipulation
Use cases
- Rails feature spec automation
- Headless browser integration tests
- JavaScript-heavy UI testing
- Containerized CI browser runs