The project is in a healthy, maintained state
A Capybara driver for Lightpanda, the fast headless browser built in Zig. Provides a production-ready driver with XPath polyfill, reliable navigation, and cookie management — ready for real-world Rails test suites.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

Capybara::Lightpanda

Gem version Total downloads Tests Rails compatible Turbo friendly

A Capybara driver for Lightpanda, the fast headless browser built in Zig.
Self-contained — built-in CDP client, no external browser-client gem required.

Capybara  →  capybara-lightpanda  →  Lightpanda GitHub stars

Capybara::Lightpanda — faster system tests for Rails, without Chromium Configuration · dual-driver setups · Turbo Rails · capability matrix · beta-testing guide

Read the docs

Install

Add this to your Gemfile and run bundle install:

group :test do
  gem "capybara-lightpanda"
end

In your test setup:

require "capybara-lightpanda"
Capybara.javascript_driver = :lightpanda

# Rails system tests don't read Capybara.javascript_driver — use driven_by:
driven_by :lightpanda

Tip

The Lightpanda binary is auto-downloaded on first use — no separate install step needed.

Important

Lightpanda is a headless agentic browser, not a layout engine. External <link rel="stylesheet"> are fetched and applied (the gem enables this by default), but @media rules and window.matchMedia() evaluate against a fixed 1920×1080 viewport — there is no resize emulation. Any spec whose visibility depends on a non-desktop viewport — for example a mobile-only CTA shown via @media (max-width: …) — should stay on Cuprite (or whichever full-browser driver you were already using). The dual-driver setup routes the layout-sensitive minority to Cuprite and the structural majority to Lightpanda for speed.

Credits

Patterns adapted from these MIT-licensed projects (cookies API, frame switching, node call/error conventions, retry/event utilities) are acknowledged with the original copyright notices in NOTICE.md.

Contributing

Bug reports and pull requests are welcome on GitHub.
For beta-testing tips and how to file useful feedback, see BETA_TESTING.md.

License

MIT License