Friday, September 5, 2014

Send content to tinyMCE with Selenium IDE

I'm doing a little functional testing with Selenium IDE and just bumped into the issue trying to send text to a tinyMCE text editor.

Tiny embeds itself in your page inside an iframe, which you have to work around.

There are a number of entries floating around the web about how to do this, but this is the one that I found the easiest.  There is no need to worry about the iframe at all because you can send your text into it by using tiny's api.

In Selenium:

Command runScript
Target tinyMCE.activeEditor.setContent('Replace with your text')