Cypress: error insert json => Special character sequence:

Viewed 595

I'm trying to insert a json with a cypress test:

  cy.get('#exampleFormControlInput3').type("{'id':1904}", { commands: false })

but when I go to insert it it gives me the following error: enter image description here

i modified the cypress.json as follows:

{
  ...
  ...
  ...
  "chromeWebSecurity": false,
  "parseSpecialCharSequences":false
}
1 Answers

As mentioned cypress docs writing {{} types {. So it should look like:

 cy.get('#exampleFormControlInput3').type("{{}'id':1904}")
Related