Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/api/commands/press.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Trigger native key events in your application to simulate keyboard
sidebar_label: press
slug: /api/commands/press
componentSpecific: false
sidebar_custom_props: { 'new_label': true }
---

<ProductHeading product="app" />
Expand All @@ -12,7 +13,7 @@ componentSpecific: false

Trigger native key events in your application to simulate keyboard interactions.

A `keydown`, `press`, and `keyup` event will be dispatched directly to the browser window.
A `keydown` and `keyup` event will be dispatched directly to the browser window.

Unlike `cy.type()`, which is best for typing multiple character keys, `cy.press()` will dispatch real keyboard events rather than simulated ones. This command is especially useful when testing focus management and keyboard navigation patterns which are critical for [accessibility testing](/app/guides/accessibility-testing) and great keyboard UX.

Expand Down