Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
docs: add instructions for testing with Protractor
Browse files Browse the repository at this point in the history
Closes #273
  • Loading branch information
mcbhenwood authored and deeg committed Sep 15, 2016
1 parent 94cb8b9 commit 53d9a74
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ myAppModule.controller('MyController', function($scope) {
</form>
```

## Testing your Application (Protractor)

If you are testing your application using Protractor and you wish to be able to automate the
contribution of rich text content as part of the tests, use the TinyMCE API method `insertContent`
in conjunction with the WebDriver's `executeScript` method, like this:

```javascript
browser.driver.executeScript("tinyMCE.activeEditor.insertContent('This is <em>RICH</em> content')");
```

Note that if you use the TinyMCE API method `setContent`, this will fail to update the Angular model
with the entered content, so use `insertContent` instead.

----


Expand Down

0 comments on commit 53d9a74

Please sign in to comment.