Above is the hierachy of dom nodes rendered by Monaco Editor. There is a textarea
node rendered, but that does not allow modification of existing content.
Example:
If the content in the editor is "Foo", then this piece of code...
cy.get('.react-monaco-editor-container textarea')
.type('{selectall}')
.type('blah');
...will only prepend blah into the editor, resulting in "blahFoo"
How do you select all and update content in monaco editor using cypress?
EDIT:
I have tried all suggestions given so far: .click(), .clear(), etc. It does not work. Please provide suggestions only if you have tried it and works.