Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium webdriver 无法在编辑器中输入文本_Selenium Webdriver_Ckeditor - Fatal编程技术网

Selenium webdriver 无法在编辑器中输入文本

Selenium webdriver 无法在编辑器中输入文本,selenium-webdriver,ckeditor,Selenium Webdriver,Ckeditor,我有太多的ck编辑器(wysiwyg)在单个页面中嵌入在iFrame中。如何切换到框架并向其发送文本。所有框架都有相同的类名。我用的是C#。如果您无法查看图像,请告诉我。我会发送代码 下面是我的代码: IWebElement actioninputissue = driver.FindElement(By.XPath(".//iframe[@class='cke_wysiwyg_frame'][1]")); driver.SwitchTo().Frame(actioninp

我有太多的ck编辑器(wysiwyg)在单个页面中嵌入在iFrame中。如何切换到框架并向其发送文本。所有框架都有相同的类名。我用的是C#。如果您无法查看图像,请告诉我。我会发送代码 下面是我的代码:

IWebElement actioninputissue = driver.FindElement(By.XPath(".//iframe[@class='cke_wysiwyg_frame'][1]"));
           driver.SwitchTo().Frame(actioninputissue);
            actioninputissue.SendKeys("Helllo");
我正在附上密码

编辑1 非常感谢您的回复!。 两个编辑器的代码,我也附上了截图

Code<tr id="actionIssueRow" class="Controls">
<th valign="top">
<div id="issueLabel">
</th>
<td colspan="3">
<textarea id="actrpnlIssueInputissue" class="wide_input richtext" name="issue" rows="3" cols="84" style="line-height: 14px; visibility: hidden; display: none;"></textarea>
<div id="cke_actrpnlIssueInputissue" class="cke_1 cke cke_reset cke_chrome cke_editor_actrpnlIssueInputissue cke_ltr cke_browser_gecko" lang="en" aria-labelledby="cke_actrpnlIssueInputissue_arialbl" role="application" dir="ltr" style="width: 500px;">
<span id="cke_actrpnlIssueInputissue_arialbl" class="cke_voice_label">Rich Text Editor, actrpnlIssueInputissue</span>
<div class="cke_inner cke_reset" role="presentation">
<span id="cke_1_top" class="cke_top cke_reset_all" style="height: auto; -moz-user-select: none;" role="presentation">
<div id="cke_1_contents" class="cke_contents cke_reset" role="presentation" style="height: 170px;">
<span id="cke_52" class="cke_voice_label">Press ALT 0 for help</span>
<iframe class="cke_wysiwyg_frame cke_reset" frameborder="0" src="" style="width: 100%; height: 100%;" title="Rich Text Editor, actrpnlIssueInputissue" aria-describedby="cke_52" tabindex="0" allowtransparency="true">
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<body class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" contenteditable="true" spellcheck="true">
<br _moz_editor_bogus_node="TRUE">
</body>
</html>
</iframe>
</div>
<span id="cke_1_bottom" class="cke_bottom cke_reset_all" role="presentation" style="-moz-user-select: none;">
<span id="cke_1_resizer" class="cke_resizer cke_resizer_ltr" onmousedown="CKEDITOR.tools.callFunction(0, event)" title="Resize">◢</span>
</span>
</div>
</div>
<input id="actrpnlIssueInputissue_txt" type="hidden" value="" name="issue_txt">
</td>
</tr>
<tr class="Controls">
<th valign="top"> </th>
<td colspan="4"> </td>
</tr>
<tr class="Controls">
<th valign="top">
<td colspan="4">
<textarea id="actrpnlActionDescriptionInputactn" class="wide_input richtext" name="actn" rows="3" cols="84" style="line-height: 14px; visibility: hidden; display: none;"></textarea>
<div id="cke_actrpnlActionDescriptionInputactn" class="cke_2 cke cke_reset cke_chrome cke_editor_actrpnlActionDescriptionInputactn cke_ltr cke_browser_gecko" lang="en" aria-labelledby="cke_actrpnlActionDescriptionInputactn_arialbl" role="application" dir="ltr" style="width: 500px;">
<span id="cke_actrpnlActionDescriptionInputactn_arialbl" class="cke_voice_label">Rich Text Editor, actrpnlActionDescriptionInputactn</span>
<div class="cke_inner cke_reset" role="presentation">
<span id="cke_2_top" class="cke_top cke_reset_all" style="height: auto; -moz-user-select: none;" role="presentation">
<div id="cke_2_contents" class="cke_contents cke_reset" role="presentation" style="height: 170px;">
<span id="cke_92" class="cke_voice_label">Press ALT 0 for help</span>
<iframe class="cke_wysiwyg_frame cke_reset" frameborder="0" src="" style="width: 100%; height: 100%;" title="Rich Text Editor, actrpnlActionDescriptionInputactn" aria-describedby="cke_92" tabindex="0" allowtransparency="true">
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<body class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" contenteditable="true" spellcheck="true">
<p>
</body>
</html>
</iframe>
</div>
<span id="cke_2_bottom" class="cke_bottom cke_reset_all" role="presentation" style="-moz-user-select: none;">
</div>
</div>
<input id="actrpnlActionDescriptionInputactn_txt" type="hidden" value="" name="actn_txt">
</td>
code
富文本编辑器,actrpnlIssueInputissue
按ALT 0以获取帮助

◢
富文本编辑器,ActrPNActionDescriptionInputActn
按ALT 0以获取帮助


您能否共享一个包含2个CKeditor(以及HTML)的快照?您是否能够在至少一个ck编辑器中输入文本?无法在其中一个ck编辑器中输入文本忘记提及。我正在使用IE浏览器