Selenium 如何使用codeception用内容填充CKeditor textarea

Selenium 如何使用codeception用内容填充CKeditor textarea,selenium,ckeditor,codeception,rich-text-editor,acceptance-testing,Selenium,Ckeditor,Codeception,Rich Text Editor,Acceptance Testing,这是这个问题的后续问题-- 这篇文章中给出的,在这个CKeditor实例中可以看到,它在CKeditor版本4.3.2标准上运行得非常好,但不幸的是,它在我的站点自己的CKeditor版本4.5.10上不起作用 我的站点的CKeditor问题-Webdriver抛出一个错误,即找不到textarea的name属性。在这个例子中,使用CKeitor这不是一个问题,我能够获得焦点并将自定义内容添加到textarea 问题-CKeditor 4.3.2(工作)和版本4.5.10(不工作)之间是否存在很

这是这个问题的后续问题--

这篇文章中给出的,在这个CKeditor实例中可以看到,它在CKeditor版本4.3.2标准上运行得非常好,但不幸的是,它在我的站点自己的CKeditor版本4.5.10上不起作用

我的站点的CKeditor问题-Webdriver抛出一个错误,即找不到
textarea
的name属性。在这个例子中,使用CKeitor这不是一个问题,我能够获得焦点并将自定义内容添加到textarea

问题-CKeditor 4.3.2(工作)和版本4.5.10(不工作)之间是否存在很大差异,导致此解决方案无法运行

text工作现场的区域

使用
id=“ckeditor”
可以正常工作

我的站点上的文本区域

<textarea class="js-text-full text-full form-textarea resize-vertical" data-drupal-selector="edit-field-pck-headline-0-value" aria-describedby="edit-field-pck-headline-0--54Lxz-5-U5g--description" id="edit-field-pck-headline-0-value--im63vH7ew8s" name="field_pck_headline[0][value]" rows="5" cols="60" placeholder="" data-editor-active-text-format="full_html" style="visibility: hidden; display: none;"></textarea>

我使用的是
name=“field\u pck\u headline[0][value]”
,但webdriver找不到这个

感谢您对我的版本(4.5.10)中的CKeditor文本区域的帮助。我很高兴提供更多的细节,让我知道


这里是我的本地CKEditor文本区域的屏幕抓图,我正试图将焦点集中到它上。我正在验收测试中使用CKEditor 4.4,selenium webdriver

这对我有用。此后

网页的html格式:

<div id="cke_1_contents" class="cke_contents cke_reset">

    <iframe class="cke_wysiwyg_frame cke_reset" frameborder="0" src=""> 
使用1_内容作为参数

以下是对我有效的方法(测试Drupal 7站点):


因为Selenium找不到文本区域,所以它似乎与CKEditor无关。所以这要么是一个时间问题,要么你的编辑器在一个框架中,你需要切换到它。CKEditor 8不存在。这可能是一些包装器或其他任何东西的版本,但不是CKEditor本身。我使用的是Drupal Core版本的CKEditor(4.5.10),我附带了一个我试图获得关注的CKEditor的屏幕抓图。我没有看到额外的iFrame(与正在工作的示例相比)。所以不确定是什么阻止了textarea聚焦。多谢各位!
$I->fillCkEditorById('1_contents', 'your added content');
$I->executeJS("CKEDITOR.instances['edit-body-und-0-value'].setData('Text entered via Selenium.');");