After implementing the provided code snippet, I noticed that it replaces the value in the element with a new one. However, I am looking to append or insert a new line rather than just replacing the existing value. Is there an alternative command like append that I can use instead of setValue for this purpose?
WebElement codeMirror = driver.findElement(By.cssSelector("div[class='CodeMirror']"))
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].CodeMirror.setValue(\"" + value + "\");", codeMirror);