I have a project that doesn't capitalize on level of HTML and values in HTML have inconsistent capitalization.
Is there any way how to force Cypress to match text if I use only lower-case strings as arguments to contains() function?
cypress
I have a project that doesn't capitalize on level of HTML and values in HTML have inconsistent capitalization.
Is there any way how to force Cypress to match text if I use only lower-case strings as arguments to contains() function?
Best Answer
As of 4.0.0, Cypress offers
matchCase
option withcontains
...cy.get('div').contains('capital sentence', { matchCase: false })