0

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.

4
  • 1
    Is your testing tool waiting for the page to finish loading (dom ready) before making assertions?
    – Kevin
    Jan 6 at 18:55
  • 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. Jan 6 at 19:33
  • 1
    Does the tool or its config have any limitations with iframes? CKeditor uses them liberally pre v5
    – Clive
    Jan 6 at 19:34
  • 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. Jan 6 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.