cypress-real-events
Cypress Real Events is a Cypress plugin that fires native system events instead of simulated JavaScript events, enabling testing of features like hover states, native focus management, and clipboard interactions. It works only in Chromium-based browsers and uses the Chrome DevTools Protocol (CDP) to communicate with the browser.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | dmtrKovalenko/cypress-real-events |
| Owner | dmtrKovalenko |
| Primary language | HTML |
| License | MIT — OSI-approved |
| Stars | 837 |
| Forks | 74 |
| Open issues | 32 |
| Latest release | v1.15.0 (2025-09-05) |
| Last updated | 2025-09-05 |
| Source | https://github.com/dmtrKovalenko/cypress-real-events |
What cypress-real-events is
This plugin extends Cypress with real event commands (realClick, realHover, realPress, realType, realTouch, realMouseDown/Up/Move, realMouseWheel, realSwipe) by leveraging CDP to dispatch native browser events rather than synthetic JavaScript events. Supports pointer types (mouse/pen), positional targeting, and keyboard shortcuts; Firefox is not supported.
Get the cypress-real-events source
Clone the repository and explore it locally.
git clone https://github.com/dmtrKovalenko/cypress-real-events.gitcd cypress-real-events# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Installation is straightforward (npm install + single import in support file), but requires Chromium-based browser; verify browser availability in CI/CD pipeline before rollout.
- Commands are named with 'real' prefix (realClick, realType) to mirror standard Cypress commands—team should document which events require native vs. simulated behavior.
- CI/CD must use standard Docker images (cypress/default or node:lts) and run cypress install to fetch browsers; cypress-browsers image is explicitly not recommended.
- Real events are global (not scoped to a single element for realPress and realType); focus management may be required before calling these commands.
- Performance impact via CDP communication is unknown; large test suites using real events should be benchmarked against simulated events in your environment.
When to avoid it — and what to weigh
- Firefox support is required — Real events work only in Chromium-based browsers. If your test matrix must include Firefox, you will need to fall back to Cypress's default simulated events or run different test suites.
- Using Docker images with known CDP issues — The README explicitly warns against cypress-browsers Docker images; real events sometimes fail due to CDP protocol instability. Requires standard cypress/default or node:lts images with browser installation.
- Simple, high-volume synthetic tests without complex user interactions — Overhead of native events via CDP may be unnecessary for straightforward form fills and button clicks; Cypress's default simulated events are faster and sufficient for basic workflows.
- Production code that depends on isTrusted flag being false — Real events will set event.isTrusted to true, potentially breaking code that explicitly checks or rejects trusted events in non-test environments.
License & commercial use
Licensed under MIT (MIT License), a permissive OSI-approved open-source license.
MIT License permits commercial use, modification, and distribution with proper attribution. No license restrictions prevent commercial testing infrastructure adoption. However, no explicit warranty or support terms are provided; review the LICENSE file for standard MIT disclaimers regarding liability and fitness for purpose.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Real events fire actual system-level interactions via CDP, which increases attack surface compared to simulated events if test environment is compromised. Test code and environments should follow standard security hardening practices. No security vulnerabilities or CVEs are mentioned in the provided data. CDP communication should be restricted to trusted test runners and isolated CI/CD agents.
Alternatives to consider
Cypress default (simulated) events
Built-in, no dependencies, works in Firefox. Suitable for most workflows, but cannot test hover states, native focus, or trusted events reliably.
Puppeteer with native events
Lower-level control over browser automation; this plugin was inspired by Puppeteer's event system. Requires rewriting tests and managing two tools (Cypress + Puppeteer) in parallel.
Playwright
Cross-browser automation with first-class support for real mouse, keyboard, and touch events. Requires migration from Cypress; better Firefox/Safari support if needed.
Build on cypress-real-events with DEV.co software developers
Cypress Real Events solves hover, focus, and trusted-event testing. Let's integrate it into your E2E pipeline and validate complex user interactions that simulated events cannot reach.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
cypress-real-events FAQ
Why would I use real events instead of Cypress's default click and type?
Does this work in headless mode or CI/CD?
Can I use this with Firefox?
Do I need to change my test structure or add new dependencies?
Software development & web development with DEV.co
DEV.co helps companies turn open-source tools like cypress-real-events into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source testing stack.
Need Native Event Testing in Your Cypress Suite?
Cypress Real Events solves hover, focus, and trusted-event testing. Let's integrate it into your E2E pipeline and validate complex user interactions that simulated events cannot reach.