Score:0

CKEditor hides from my testing tool

ch flag

I am building an automated testing tool for the drupal site that I maintain. The site has migrated to D9 and functions normally for a human user. When my python scripts pull up selenium/Chrome browser and go to the Create Content Page page, CKEditor does not process the body field.
I open my chrome browser and sign in with the same credentials and CKEditor appears.

My python bot is able to create node pages, edit them, delete them, create custom blocks and assign those in entity reference fields, it is only this CKEditor field now that stands in my way of complete site functionality test automation! Has anyone else seen this behavior before? Since a picture is worth a thousand words, here is a marked up screenshot of it happening. No other input formats are available on this field, it is only the Formatted Text setting with Restricted HTML set to CKEditor permitted on this field. enter image description here

I have even verified that the ckeditor.js file is present when selenium loads the page, and have gone as far as downloading that file and having python run it against the webpage after the page has finished loading.

Kevin avatar
in flag
Is your testing tool waiting for the page to finish loading (dom ready) before making assertions?
DeveloperWeeks avatar
ch flag
Yes. I've even added in a "wait 20 seconds" after the "wait for page to load" just to see if it needed the time. That also allowed me to line up the screenshot.
cn flag
Does the tool or its config have any limitations with iframes? CKeditor uses them liberally pre v5
DeveloperWeeks avatar
ch flag
Selenium does require special steps to shift reference in and out of an iframe. I have already figured out that sequence and syntax with working with Entity Reference Browser. In this instance, the CKEditor iframe is not created and the field remains a textarea. When I tell the tool to go into the iframe that should be there, it says no such element exists. When I put a long enough delay on the step that I can open Chrome's dev tools in the temporary window, I can confirm CKEditor has not made an iframe.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.