How do I get an element by name in Cypress if the name contains a dot?

Viewed 22

I have some elements that have a dot in the name like the below and I get "Syntax error, unrecognized expression". Is there a way to target those?

cy.get('input[name=foo.bar]')
1 Answers

Try putting some double-quotes around the attribute value

cy.get('input[name="foo.bar"]')
Related