---
title: "Press tab in your tests: Introducing cy.press()"
url: "https://www.cypress.io/blog/press-tab-in-your-tests-introducing-cy-press"
description: "Tab key testing is here with cy.press()! This long-requested feature gives you the ability to trigger real native keyboard events in your tests, starting with…"
---

# Press tab in your tests: Introducing cy.press()

April 8, 2025

By Jennifer Shehane

![Abstract illustration of cy.press() command with text: Introducing cy.press()](https://storage.ghost.io/c/12/89/12899ca1-4786-4eea-b7e1-9c5268baa48a/content/images/2025/03/Cy.press-1.png)

Tab key testing is here with `cy.press()`! This long-requested feature gives you the ability to trigger real native keyboard events in your tests, starting with support for the Tab key.

This is a big step toward improving [accessibility testing](https://docs.cypress.io/app/guides/accessibility-testing?utm_source=blog&utm_medium=cy-press-intro&utm_content=accessibility-testing) and ensuring smooth keyboard navigation experiences in your application.

## **Why we built cy.press()**

Historically, Cypress users have relied on `cy.type()` to simulate keyboard input. While `cy.type()` is great for typing characters in typeable elements, it doesn't accurately replicate how browsers handle non-character keys like the **Tab** key.

That’s why we built `cy.press()`. This new command dispatches native `keydown`, `press`, and `keyup` events directly to the browser.

## **Start testing keyboard navigation today**

With the first release of `cy.press()`, we’re starting with support for one of the most essential keys for accessibility: the **Tab** key.

Here’s an example of how you can use it:

```JavaScript
it('moves focus to the next form element when pressing Tab', () => {
  cy.visit('/my-login’)
  cy.get('input.email’).type(‘username’)
  cy.press(Cypress.Keyboard.Keys.TAB)
  cy.get('input.password’).should('have.focus')
})
```

Under the hood, this will dispatch real Tab key events, causing the browser to move focus to the next focusable element just like a real user pressing the Tab key.

_**Note:** `cy.press()` is currently supported in Chromium browsers and Firefox v135+. WebKit support is not available yet._

## **What's next? We want your feedback!**

We’re releasing `cy.press()` with Tab support first because it’s one of the most common and important use cases. It’s also one of our most upvoted GitHub issues and we appreciate every comment, link, and example you shared with us. But this is just the beginning.

We plan to expand support to additional keys and functionality but we want to hear from **you**.

-   What keyboard interactions would you like to test with `cy.press()`?
-   What challenges do you face testing keyboard navigation today?
-   What would make `cy.press()` even better?

Drop us a comment on [this GitHub issue](https://github.com/cypress-io/cypress/issues/31051?ref=cypress-io.ghost.io).

## **Try it out!**

`cy.press()` is available today in **Cypress v14.3.0**. Check out the full documentation [here](https://on.cypress.io/press?utm_source=blog&utm_medium=press-announcement&utm_content=here) and start leveling up your accessibility and keyboard navigation tests.