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

Cannot type on arbitrary elements #172

Closed
MarkAZhang opened this issue Jun 16, 2016 · 3 comments
Closed

Cannot type on arbitrary elements #172

MarkAZhang opened this issue Jun 16, 2016 · 3 comments
Assignees
Labels
type: feature New feature that does not currently exist
Milestone

Comments

@MarkAZhang
Copy link

Any element can receive keydown events if it has a tabindex. However, the cypress type command only works on input text elements and textareas. In order to fire keydown events on arbitrary elements, for example if we want to test keyboard shortcuts in an app, we have to manually create a KeyboardEvent and call dispatchEvent on the element. While this is a viable workaround, a solution in cypress would be preferred.

@jennifer-shehane jennifer-shehane added the type: feature New feature that does not currently exist label Jun 16, 2016
@bahmutov
Copy link
Contributor

can it be done using{force: true}? Or is Cypress not allowing to type at all in these elements? https://docs.cypress.io/v1.0/docs/type#options-usage

@brian-mann
Copy link
Member

Nope, the error checking involving the element type happens prior to that.

This is a pretty easy addition so I'll likely shoot to have this in 0.16.3.

@brian-mann brian-mann self-assigned this Jun 16, 2016
@brian-mann brian-mann added this to the 0.16.3 milestone Jun 16, 2016
@brian-mann
Copy link
Member

Fixed in 0.16.3.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

4 participants