Skip to content
CAI
Software that uses CAICheck a score

rubycdp/cuprite

53.6

Adequate · 6 November 2026

1.2k

lines of production code

Ruby

with JavaScript

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Support for HTML5 drag-and-drop and time inputs

The Cuprite driver now emulates HTML5 drag-and-drop interactions, allowing users to drag elements between targets with proper event dispatching (dragstart, dragenter, dragover, drop, etc.) and modifier key support. Additionally, the driver now correctly handles HTML5 time-based input types (time, date, month, week, datetime-local), ensuring that values are set and input events are triggered appropriately for these fields. Also in this area: Improved drag-and-drop modifier handling and page initialization stability; Improved HTML5 drag-and-drop behavior and send\_keys focus handling; Device emulation support and input event fixes.

lib/capybara/cuprite/javascripts · high confidence

Removals

Removed internal browser client, process, and WebSocket implementations

The internal classes responsible for managing the browser lifecycle and communication—specifically \Browser::Client\, \Browser::Process\, and \Browser::WebSocket\—have been removed from the codebase. This deletion eliminates the custom logic for spawning Chrome/Chromium processes, handling command-line arguments, and managing WebSocket connections for debugging.

lib/capybara/cuprite/browser · high confidence

Behavioural changes

176 commits (26 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 176 commits (26 fixs), 10 files: “ref(node): deprecate Node\#description instead of making it private”; “provide better example of setting inspector option \[skip ci\]”; “fix: ignore empty or nil keys in Node\#send\_keys (\#313)”; and 159 more (refs \#313, \#267, \#299, \#272, \#334, …).

(repo-wide) · low confidence · unverified

3 commits (0 fixes) modifying lib/capybara/cuprite/page

A change to existing behaviour in lib/capybara/cuprite/page — 3 commits, 2 files: “ref(driver): read the window's url and title instead of Ferrum's current\_url and current\_title (\#353)”; “docs(page): explain why the dialog handler skips Page\#command”; “ref(page): split Page into Frames and Modals modules” (refs \#353).

lib/capybara/cuprite/page · medium confidence · unverified

Added Bundler binstubs and updated console driver require path

The project now includes generated binstubs for rake and rspec in the bin directory, ensuring these tools run consistently with the project's Gemfile dependencies. Additionally, the bin/console script was updated to require 'capybara/cuprite' instead of the previous 'cuprite' path, aligning with the current library's API structure.

bin · high confidence

Cuprite driver now inherits from Ferrum::Browser and exposes new configuration options

The Cuprite driver has been refactored to inherit directly from \Ferrum::Browser\ instead of managing its own process and client, simplifying the architecture. This change introduces new browser-level configuration options: \raise\_on\_unhandled\_modal\ allows tests to fail when JavaScript dialogs are not handled, and \url\_blacklist\/\url\_whitelist\ enable network request filtering. The driver also now supports window size management via \@options.window\_size\ and resets this size on session reset. Additionally, the \Cookie\ class now exposes \size\, \session?\, and \httpOnly\ (corrected casing) attributes, and the driver version has been bumped to 0.18.

lib/capybara/cuprite · high confidence

Refactored error classes and updated error messages

The error handling classes in Cuprite have been refactored: several classes (NoSuchWindowError, JSErrorItem, BrowserError, JavascriptError, StatusFailError, FrameNotFound, NodeError, KeyError, TimeoutError, ScriptTimeoutError, DeadClient) have been removed, while others (InvalidSelector, MouseEventFailed, UnhandledModalError, ObsoleteNode) have been restructured. Specifically, InvalidSelector and MouseEventFailed now inherit directly from ClientError instead of NodeError, and their message formats have been updated to provide clearer context (e.g., InvalidSelector now mentions the method and selector, MouseEventFailed now suggests using node.trigger). UnhandledModalError is a new class added to handle unhandled browser modals.

cuprite · high confidence

Switches underlying browser automation engine to Ferrum

The Capybara Cuprite driver now relies on the Ferrum library for browser communication instead of its previous implementation. This change updates the internal dependencies and requires the Ferrum gem, which may alter low-level browser interaction behavior and performance characteristics for users relying on the driver.

lib/capybara · high confidence

Test coverage

1 commit adding/updating tests in spec/browser, spec/node; 55 commits adding/updating tests in spec/integration; Expanded test fixtures for browser interaction scenarios; Removal of legacy unit test suite; Updated test fixtures in spec/tmp; Updated test infrastructure and CI artifact handling; Updated test support infrastructure for Cuprite and Ferrum.

Dependencies

Updated jQuery to version 3.7.1

The jQuery library included in the test support assets has been upgraded from a previous version to 3.7.1. This ensures that tests relying on this public script file use the latest stable release of jQuery.

spec/support/public · high confidence

Upgrade to Ferrum 0.18 and Capybara 3, drop Ruby 2.6 support

The gem now relies on Ferrum (\~\> 0.18.0) instead of the previous driver stack, and requires Capybara \~\> 3.0. Development dependencies have been updated (e.g., RSpec \~\> 3.10, Rubocop \~\> 1.22, Sinatara \~\> 3.2), and the project now requires Ruby \>= 3.1, dropping support for Ruby 2.6. The homepage and metadata have been updated to reflect the move to the rubycdp organization.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 48 → 54 (+5.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 62 → 62 (+0.2)
  • Architecture 69 → 69 (+0.0)
  • Maturity 36 → 54 (+17.6)
  • Readiness 46 → 46 (+0.0)
  • Security 100 → 75 (-24.6)

Resolved (7)

  • Change coupling: browser.rb ↔ node.rb (lib/capybara/cuprite/browser.rb)
  • Documentation: no installation or build instructions (docs/7-javascript.md)
  • FixmeComment (lib/capybara/cuprite/node.rb)
  • Inconsistent collection management patterns. Driver uses explicit set_cookie, remove_cookie, and clear_cookies. Browser uses setter methods (url_whitelist=, url_blacklist=) for configuration. While these are different domains (runtime state vs config), the lack of a consistent pattern for 'adding/removing items from a list' (e.g., add_header vs headers=) is slightly jarring, though less severe than the others. However, Driver.add_headers and Driver.add_header exist alongside Driver.headers=, which is redundant.
  • Inconsistent locator strategy naming. The Browser and Node classes use a generic find(method, selector) pattern where method is likely a symbol (e.g., :css, :xpath). However, the Driver class exposes explicit find_xpath and find_css methods. This forces consumers to know the internal implementation details of the Browser/Node abstraction to use the more explicit Driver API, or conversely, prevents the use of the generic find on the Driver if it doesn't support it, creating a fragmented API surface for the same intent.
  • Redundant property accessors. Browser.property and Node.property do the same thing (accessing a DOM property). Additionally, Node exposes Node. which is an alias for Node.property(name). While [] is idiomatic Ruby, having both property and [] on Node alongside a separate Browser.property creates confusion about whether one should use the node method or the browser method for property access.
  • TooManyMethods: Browser (lib/capybara/cuprite/browser.rb)

New (7)

  • Hotspot: lib/capybara/cuprite/node.rb (lib/capybara/cuprite/node.rb)
  • Low cohesion: Page (LCOM4 4) (lib/capybara/cuprite/page.rb)
  • No SBOM
  • No artifact signing
  • No build provenance
  • Unpinned build actions
  • Workflow token permissions not restricted (.github/workflows/docs.yml)

Changes since last survey

  • 74 commits — 71 feature/other, 3 fixes

By area

  • (root) — 39 commits
  • lib/capybara — 29 commits
  • spec/features — 2 commits
  • .github/workflows — 1 commit
  • docs/13-screenshots.md — 1 commit
  • docs/6-node.md — 1 commit
  • spec/support — 1 commit

Notable commits

  • fix: fix(node): keep Node#attributes, Ferrum has no counterpart
  • fix: fix(node): pass the color input value to JavaScript as an argument
  • fix: fix(page): leave touch emulation alone on resize unless mobile is set (#352)
  • change: chore(deps): drop the ferrum pin from Gemfile now that 0.20.1 is released
  • change: chore(release): bump version to 0.20
  • change: chore: drop Ruby 3.1 support (#348)
  • change: ci(docs): notify docs.rubycdp.com on release tags (#358)
  • change: docs(page): explain why the dialog handler skips Page#command
  • change: docs: document Node#property and Node#attributes
  • change: docs: fix drag_by example and changelog order
  • change: docs: fix page.driver.reset! name in README
  • change: docs: introduce page.driver.browser as the Ferrum API
  • change: docs: note Ferrum 0.20 upgrade impact and base_url override in changelog
  • change: docs: point deprecated driver methods to their replacements
  • change: docs: wrap changelog line
  • change: feat(driver): expose Ferrum console as Driver#console (#351)
  • change: feat(driver): set Ferrum's base_url from Capybara so cookies default their domain
  • change: ref(browser): deprecate Browser#visit and Browser#status_code in favor of goto and network.status
  • change: ref(browser): deprecate Browser#window_handle in favor of current_window_handle
  • change: ref(browser): make Browser#find private, remove active_element and within_window
  • …and 54 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

rubycdp/cuprite was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 701df642e97c6829186b42eb507cc0dd8abff36a — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.