sendKeys not working with "div contenteditable"

Example:
<div id=“textarea” contenteditable=“plaintext-only”>Hello, World…!</div>

{
“Command”:“sendKeys”,
“Target”:"//*[@id=“textarea”]",
“Value”:“Another text”
}

Hi, instead of using sendkeys, please try the editContent command.

The editContent command supports editing content-editable elements, e.g., rich text editors. After a user edits the content of a content-editable element while recording, a corresponding editContent command will be automatically generated, which is triggered by detecting the focus removal of the element.

1 Like

I’m trying and get [error] Target is not contenteditable.

it work for contenteditable=“true” and not working contenteditable=“plaintext-only”
and before use editContent command i use storeEval command to change it attribute = “true” but it get [error] not allowed Content-Security-Policy…

{
“Command”: “storeEval”,
“Target”: “document.getElementById(“textarea”).contentEditable = “true””,
“Value”: “”
}

How to change attribute value contenteditable=“true” ??
Thanks for your reply. :slightly_smiling_face:

Hmm… a link to the website or the edit component it is using would be helpful, so that we can test it.