Skip to content

Commit 7c90f67

Browse files
authored
docs: remove F-keys from cy.press() documentation (#6261)
* docs: remove f keys from cy.press doc * prettier
1 parent 72f1917 commit 7c90f67

File tree

1 file changed

+7
-30
lines changed

1 file changed

+7
-30
lines changed

docs/api/commands/press.mdx

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ A `keydown`, `press`, and `keyup` event will be dispatched directly to the brows
1616

1717
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.
1818

19-
:::caution
20-
21-
<strong>Supported Browsers:</strong>
22-
This command is supported in chromium browsers and Firefox versions >= v135. WebKit
23-
is not supported. This command will fail if executed in a browser that does not support
24-
it.
25-
26-
:::
27-
2819
## Syntax
2920

3021
```javascript
@@ -88,18 +79,13 @@ The key to press. Values for non single character keys are available on [`Cypres
8879
| `Cypress.Keyboard.Keys.BACKSPACE` | `"Backspace"` |
8980
| `Cypress.Keyboard.Keys.DELETE` | `"Delete"` |
9081
| `Cypress.Keyboard.Keys.INSERT` | `"Insert"` |
91-
| `Cypress.Keyboard.Keys.F1` | `"F1"` |
92-
| `Cypress.Keyboard.Keys.F2` | `"F2"` |
93-
| `Cypress.Keyboard.Keys.F3` | `"F3"` |
94-
| `Cypress.Keyboard.Keys.F4` | `"F4"` |
95-
| `Cypress.Keyboard.Keys.F5` | `"F5"` |
96-
| `Cypress.Keyboard.Keys.F6` | `"F6"` |
97-
| `Cypress.Keyboard.Keys.F7` | `"F7"` |
98-
| `Cypress.Keyboard.Keys.F8` | `"F8"` |
99-
| `Cypress.Keyboard.Keys.F9` | `"F9"` |
100-
| `Cypress.Keyboard.Keys.F10` | `"F10"` |
101-
| `Cypress.Keyboard.Keys.F11` | `"F11"` |
102-
| `Cypress.Keyboard.Keys.F12` | `"F12"` |
82+
| `Cypress.Keyboard.Keys.SPACE` | `"Space"` |
83+
84+
:::info
85+
86+
F1-F12 keys are not supported. These keys are used for browser shortcuts, and can prevent the test suite from executing properly after they are pressed.
87+
88+
:::
10389

10490
<Icon name="angle-right" /> **options _(Object)_**
10591

@@ -178,15 +164,6 @@ By dispatching native keyboard events to the browser, this command will cause th
178164

179165
If your application prevents the default behavior of the `beforeunload` event, this may cause issues when navigating away from the current page.
180166

181-
### Firefox F6 key
182-
183-
In Firefox, [the F6 key is used to change focus to the next frame](https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_current-page).
184-
Pressing F6 via `cy.press()` will dispatch the initial `keydown` appropriately, but
185-
due to the focus change, the `keyup` event will not be dispatched to the iframe containing
186-
the application under test.
187-
188-
To re-focus the iframe after pressing F6, use [`cy.focus()`](/api/commands/focus).
189-
190167
## History
191168

192169
| Version | Changes |

0 commit comments

Comments
 (0)