The web page that I wanted to test using Selenium consisted of multiple tinymce editors used for various rich textareas. Internet Explorer 8 was the target browser. Obviously simply using the type command with input text did not work. So googled on how other people achieved this, found following two solutions:
1. Select frame and then type text
2. Identify the text area using DOM locator
selectFrame id_of_tinymce_iframe focus tinymce type tinymce Text_text selectFrame relative=parent
type dom=document.getElementById('id_of_tinymce_iframe').contentWindow.document.body Test_text
Both of them seem to work on Firefox where I develop my test using Selenium IDE. But on IE 8 I would not see the "Test_text" in the TinyMCE textarea even though the steps would run fine. The way I ended up achieving this was by using the following:
Yes and this did work on IE 8.
focus dom=document.getElementById('id_of_tinymce_iframe').contentWindow.document.body getEval selenium.browserbot.getCurrentWindow().document.getElementById('id_of_tinymce_iframe').contentWindow.document.body.innerHTML = 'Test_text';
Click here to read "Selenium tips for better automation".