Skip to content

Cypress treats case-insensitive selectors as a syntax error instead of a valid selector #25304

Open
@TiManGames

Description

Current behavior

Cypress treats case-insensitive selectors as a syntax error, despite the selector being valid
image

Desired behavior

Cypress should find the element. It works in Cypress Runner just fine.

image

Test code to reproduce

cy.visit("https://www.saucedemo.com/");
cy.get('.login-box').find(`[data-test="login-button" i]`); <--- fails on "invalid syntax" 

Cypress Version

11.2.0

Node version

v14.18.0

Operating System

Windows 10 22H2

Debug Logs

No response

Other

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingReproducibleCan be reproducedTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.type: bugtype: unexpected behaviorUser expected result, but got another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions