@@ -21,9 +21,9 @@ Currently, the only key supported is `Tab`.
21
21
:::caution
22
22
23
23
<strong >Supported Browsers:</strong >
24
- This command is supported in chromium browsers and Firefox versions >=
25
- v135. WebKit is not supported. This command will fail if executed in a browser that
26
- does not support it.
24
+ This command is supported in chromium browsers and Firefox versions >= v135. WebKit
25
+ is not supported. This command will fail if executed in a browser that does not support
26
+ it.
27
27
28
28
:::
29
29
@@ -61,7 +61,7 @@ cy.get('input.second').should('have.focus')
61
61
cy .get (' input.first' ).focus ()
62
62
cy .press (Cypress .Keyboard .Keys .TAB )
63
63
// Errors because press yields null
64
- .should (' have.focus' )
64
+ .should (' have.focus' )
65
65
```
66
66
67
67
### Arguments
@@ -80,10 +80,10 @@ The key to press. The supported values are available on [`Cypress.Keyboard.Keys`
80
80
81
81
Pass in an options object to change the default behavior of ` .press() ` .
82
82
83
- | Option | Default | Description |
84
- | ---------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------ ----------------------------------------------------------------------------------- |
85
- | ` log ` | ` true ` | Displays the command in the [ Command log] ( /app/core-concepts/open-mode#Command-Log ) |
86
- | ` timeout ` | [ ` defaultCommandTimeout ` ] ( /app/references/configuration#Timeouts ) | Time to wait for ` cy.press() ` to resolve before timing out |
83
+ | Option | Default | Description |
84
+ | --------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
85
+ | ` log ` | ` true ` | Displays the command in the [ Command log] ( /app/core-concepts/open-mode#Command-Log ) |
86
+ | ` timeout ` | [ ` defaultCommandTimeout ` ] ( /app/references/configuration#Timeouts ) | Time to wait for ` cy.press() ` to resolve before timing out |
87
87
88
88
<HeaderYields />
89
89
@@ -122,8 +122,8 @@ If your application prevents the default behavior of the `beforeunload` event, t
122
122
123
123
## History
124
124
125
- | Version | Changes |
126
- | ------------------------------------------ | --------------------------- |
125
+ | Version | Changes |
126
+ | ----------------------------------- | - --------------------------- |
127
127
| [ 14.3.0] ( /app/references/changelog ) | Added the ` .press() ` command |
128
128
129
129
## See also
0 commit comments