angularjs - How can I set data to field with CKEditor in Protractor test? -
my issue got message, "element not visible" in protractor when tried set data field ckeditor. application working angularjs.
element(by.model("question.translations[lang.locale].answer")).sendkeys("test answer e2e!!!");
how can set (or get) data field ckeditor in protractor test? html code:
<div ng-repeat="lang in languages"> <div class="col-md-4"> <div class="input-icon right"> <div ckeditor="ckoptions" ng-model="question.translations[lang.locale].answer"></div> </div> </div> </div>
when try this
var value = 'hello'; browser.executescript(function (arguments) { window.ckeditor.instances.html_editor.setdata(arguments[0]); }, value);
i error: failed: unknown error: cannot read property 'setdata' of undefined
i found solution
browser.switchto().frame(element(by.css('#cke_editor1 iframe')).click().sendkeys("test answer e2e"));
Comments
Post a Comment