I'm using Selenium to run automated tests on a page which contains a CodeMirror editor. I don't have access to the object however I do have jQuery available. How can I edit the contents of the editor in such a way that CodeMirror recognises the change?
The wrapping div
DOM element (with class CodeMirror
) will have a property CodeMirror
that refers to the editor instance object. You can call setValue
on that.