How to fill CLEditor with Selenium IDE
Here’s a snippet to fill the contents of a CLEditor in a user context library for Selenium IDE. Put this in a sample
/**
* Fills a CLEditor
*
* @param locator May be a parent locator, such as div[data-attribute="xyz"], as long as
* there is only one textarea child
* @param html The html to type
*/
Selenium.prototype.doTypeHTMLEditor = function(locator, html) {
var element = this.page().findElement(locator);
var textarea = element.getElementsByTagName('textarea');
if (textarea) {
jQuery(textarea[0]).cleditor()[0].clear().execCommand("inserthtml", html).updateTextArea();
}
};
you should call the locator with an element parent of the TEXTAREA. Or just adapt the function to use the textarea itself.