Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cypress: error insert json => Special character sequence:

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
}
like image 366
bigeyes Avatar asked Jul 27 '26 07:07

bigeyes


1 Answers

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

 cy.get('#exampleFormControlInput3').type("{{}'id':1904}")
like image 179
Alapan Das Avatar answered Jul 29 '26 03:07

Alapan Das



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!