Have you reviewed the HTML to ensure that the pathway, //bodyonly returns your one object? To do this, hit the F12 key and then click on ‘Open DevTools’. This should open part of your browser to review the HTML. Click on the top left icon in this section that allows you to review the attributes of specific objects (or use CTRL + SHIFT + C and click on the object). Click into the HTML area and then use CTRL + F to open the Find box. Copy and paste your pathway into the Find box. To the right of this box, do you see a 1 of 1? If you do, all’s good. If you don’t, you need to fix your pathway.
The setText can send a text into a HTML <input type="text"> element, <textarea> element or a few other limited types of HTML elements. A <body> element will never receive a text sent by setText. This code will never work.
I started 14 days trial of CKeditor, opened it on my desktop. In a editor pane, I added a text “Foo bar buz”. Then I opend the “Dev Tool” to see how the DOM of the viewport looks like. Please find the following screenshot.
I’m sorry, but the knowledge sources do not contain information about automating text input in CKEditor using Selenium. The documentation covers CKEditor integration with HTML forms, clipboard handling, and server-side automation via the Server-side Editor API, but does not mention Selenium or browser automation tools for this purpose. If you need automation, you might want to explore the Server-side Editor API, which allows manipulation of document content programmatically from the server side, but this is different from browser automation with Selenium Server-side editor API.
I looked at
This document presents a lot of sample cases working with the text content in CKeditor.