Skip to content

Improve clicking with modifier(s) #486

@chrisbreiding

Description

@chrisbreiding

The current experience issuing a ctrl-click , cmd-click, etc could use some improvement.

First, add a section to the cy.click doc concerning modifiers, with an example or two.

Second, consider updating the cy.click command to accept modifiers directly instead of needing cy.type command first.

Currently you need this to ctrl-click:

cy.get('body').type('{ctrl}', { release: false })
cy.get('#some-el').click()

Something like this would be a lot better:

cy.get('#some-el').click({ ctrlKey: true })

Metadata

Metadata

Assignees

No one assigned

    Labels

    pkg/driverThis is due to an issue in the packages/driver directorytopic: cy.click 🖱type: enhancementRequested enhancement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions