title: protractor tinymce automated tests
body: <p>I'm trying to test AngularJS tinyMCE with protractor and I keep bumping into problems when trying to send content or do any test on the tinyMCE editor. The environment for testing is <code>Selenium</code> with <code>Jasmine2</code></p>
  
  <p>Currently i have:</p>
  
  <h1>HTML</h1>
  
  <pre><code>&lt;textarea 
      id="page-editor" 
      ui-tinymce="tinymceOptions" 
      ng-model="item.description"&gt;
  &lt;/textarea&gt;
  </code></pre>
  
  <h1>Test</h1>
  
  <pre><code>browser.switchTo().frame('page-editor_ifr');
  var body = element(by.id('tinymce'));
  body.clear();
  body.click();
  body.sendKeys('Testing123');
  </code></pre>
  
  <p>The error I get is: <code>Failed: no such frame</code> but if I load the page normally the frame is there with the correct ID. Also tried using promise</p>
  
  <pre><code>browser.switchTo().frame('page-editor_ifr')
      .then(function() {
          var body = element(by.id('tinymce'));
          body.clear();
          body.click();
          body.sendKeys('Testing123');
      });
  </code></pre>
  
  <p>but with no result.</p>