Selenium and TinyMCE

There is a bit problem using selenium to type in textarea formatted by tinymce. We can’t use


because tinymce uses html inside iframe instead of textarea to perform wysiwyg editing.

To make selenium type in tinymce iframe, write this in test code (this example using



driver = IWebDriver
iframeLocator = name of iFrame
sValue = desired content of textarea

Tinymce set the name of iframe as textareaid_ifr.
If textarea ID is content, iframe name would be content_ifr

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.