Add support for {home} and {end} special character sequences
See original GitHub issueCurrent behavior:
cy.type('{home}')
and cy.type('{end}')
are not supported:
CypressError: Special character sequence: '{home}' is not recognized. Available sequences are: {selectall}, {del}, {backspace}, {esc}, {{}, {enter}, {leftarrow}, {uparrow}, {rightarrow}, {downarrow}, {alt}, {option}, {ctrl}, {control}, {meta}, {command}, {cmd}, {shift}
CypressError: Special character sequence: '{end}' is not recognized. Available sequences are: {selectall}, {del}, {backspace}, {esc}, {{}, {enter}, {leftarrow}, {uparrow}, {rightarrow}, {downarrow}, {alt}, {option}, {ctrl}, {control}, {meta}, {command}, {cmd}, {shift}
Desired behavior:
Support the {home}
and {end}
special character sequences.
Versions
Cypress 3.0.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Special character sequences
Special character sequences. Printable characters, such as “a” or “b”, are defined by simply typing them into a regular expression.
Read more >about Special Characters - PowerShell | Microsoft Learn
Describes the special character sequences that control how PowerShell interprets the next characters in the sequence.
Read more >Regular Expression (Regex) Tutorial
Escape Sequences (\char): To match a character having special meaning in regex, you need to use a escape sequence prefix with a backslash...
Read more >How to type special characters on a Windows 10 PC - The Verge
Click on the icon to switch keyboards. The US International Keyboard gives you two ways to add a special character: Use the right-hand...
Read more >Special Characters and Quoting - Learning the bash ... - O'Reilly
|, Pipe, 1 ; [, Start character-set wildcard, 1. ] ; ] End character-set wildcard, 1 ; {, Start command block, 7. } ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great suggestion. The code for special characters can be found here: https://github.com/cypress-io/cypress/blob/develop/packages/driver/src/cypress/keyboard.coffee#L11
As a workaround, you should be able to create a custom command for these by triggerering the keyboard events after knowing the keyCode like this:
Great job! Thanks.