title: Typing characters in rich text editor using Selenium IDE
body: <p>I'm currently setting up an automation testing in Salesforce application but I am having a problem of typing characters in rich text editor using Selenium IDE.</p>
  <p>As I know that the rich text editor is wrapped in the iframe. In the HTML, I got the code like this:</p>
  <pre><code>&lt;iframe id=&quot;j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_frame&quot;     
  frameborder=&quot;0&quot; allowtransparency=&quot;true&quot; tabindex=&quot;0&quot; src=&quot;&quot; title=&quot;Rich text editor, 
  j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c, press ALT 0 for help.&quot; 
  style=&quot;width:100%;height:100%&quot;&gt;
  
  &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org
  /TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
  
  &lt;html class=&quot;CSS1Compat&quot; lang=&quot;en&quot; dir=&quot;ltr&quot; style=&quot;background-color: transparent;&quot;&gt;
  &lt;head&gt;
  &lt;body id=&quot;j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body&quot;   
  class=&quot;cke_show_borders&quot; contenteditable=&quot;true&quot; spellcheck=&quot;false&quot; style=&quot;background-
  color: transparent;&quot;&gt;
  &lt;/html&gt;
  
  &lt;/iframe&gt;
  </code></pre>
  <p>My current steps are:</p>
  <ol>
  <li><strong>Command</strong>: selectFrame, <strong>Target</strong>: <code>xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_frame')]</code></li>
  <li><strong>Command</strong>: click, <strong>Target</strong>: <code>xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body')]</code></li>
  <li><strong>Command</strong>: focus, <strong>Target</strong>: <code>xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body')]</code></li>
  <li><strong>Command</strong>: sendKeys, <strong>Target</strong>: <code>xpath=//*[contains (@id, 'j_id0:j_id4:j_id6:j_id115:j_id117:textAreaDelegate_Comments__c_rta_body')],</code> <strong>Value</strong>: Input Value in Rich Text Editor!!!</li>
  </ol>
  <p>When I ran this test case, and I got the following error in step 4 - <code>Unexpected Exception: Error: Cannot set the selection end. fileName -&gt; chrome://selenium-ide/content/selenium-core/scripts/atoms.js, lineNumber -&gt; 6118, columnNumber -&gt; 6</code>. I didn't know what did I do wrong and why I couldn't typing characters in rich text editor using Selenium IDE.</p>