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

Commit 53d9a74

Browse files
mcbhenwooddeeg
authored andcommitted
docs: add instructions for testing with Protractor
Closes #273
1 parent 94cb8b9 commit 53d9a74

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,19 @@ myAppModule.controller('MyController', function($scope) {
125125
</form>
126126
```
127127

128+
## Testing your Application (Protractor)
129+
130+
If you are testing your application using Protractor and you wish to be able to automate the
131+
contribution of rich text content as part of the tests, use the TinyMCE API method `insertContent`
132+
in conjunction with the WebDriver's `executeScript` method, like this:
133+
134+
```javascript
135+
browser.driver.executeScript("tinyMCE.activeEditor.insertContent('This is <em>RICH</em> content')");
136+
```
137+
138+
Note that if you use the TinyMCE API method `setContent`, this will fail to update the Angular model
139+
with the entered content, so use `insertContent` instead.
140+
128141
----
129142

130143

0 commit comments

Comments
 (0)