Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cy.type('{insert}') is not supported #3845

Closed
fr0 opened this issue Mar 28, 2019 · 4 comments
Closed

cy.type('{insert}') is not supported #3845

fr0 opened this issue Mar 28, 2019 · 4 comments

Comments

@fr0
Copy link

@fr0 fr0 commented Mar 28, 2019

Current behavior:

CypressError: Special character sequence: '{insert}' is not recognized. Available sequences are: {selectall}, {del}, {backspace}, {esc}, {{}, {enter}, {leftarrow}, {rightarrow}, {uparrow}, {downarrow}, {home}, {end}, {alt}, {option}, {ctrl}, {control}, {meta}, {command}, {cmd}, {shift}

Desired behavior:

{insert} should be a supported key. Not sure why it isn't. For that matter, {pageup} and {pagedown} should also be supported.

Versions

3.2.0

@jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Mar 29, 2019

Here's the most recent PR adding support for the {home} and {end} chars. It should help anyone wanting to get started adding support for these chars as well. #3071

@desfero
Copy link
Contributor

@desfero desfero commented Apr 2, 2019

@jennifer-shehane why we don't allow putting Unicode key codes inside curly braces like this

cy.get('...').type('This is page up {33}')

(https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which) or even better with

cy.get('...').type('This is page up {PageUp}')

(https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key)

@cypress-bot
Copy link

@cypress-bot cypress-bot bot commented Apr 10, 2019

The code for this is done in cypress-io/cypress#3892, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

jennifer-shehane added a commit that referenced this issue Apr 10, 2019
* Attempt to add insert, page up and page down keys.

* Fix keyboard event for page down. Fix tests' titles.

* Fix the pagedown test.

* Fix comment for the insert key.
laurinenas added a commit to laurinenas/cypress that referenced this issue Apr 28, 2019
…press-io#3892)

* Attempt to add insert, page up and page down keys.

* Fix keyboard event for page down. Fix tests' titles.

* Fix the pagedown test.

* Fix comment for the insert key.
@cypress-bot
Copy link

@cypress-bot cypress-bot bot commented May 17, 2019

Released in 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants