我如何在p標籤中添加文本?如何在e2e測試中添加iframe中的文本量角器
<div id="cke_1_contents" class="cke_contents cke_reset" role="presentation" style="height: 350px;"><span id="cke_44" 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, editor2" aria-describedby="cke_106" tabindex="0" allowtransparency="true">
<html lang="en" dir="ltr">
<head>
<body class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" contenteditable="true" spellcheck="true">
<p>
<br type="_moz">
</p>
</body>
</html>
</iframe>
</div>
我用這個代碼,但報錯
var p = element(by.css('.cke_editable p'));
p.sendKeys('This is a peragraph tag');
請過去的,你得到的錯誤那裏。 –
css看起來不正確。它應該是'.cke_editable> p' –
沒有再次發生同樣的錯誤發生沒有發現元素@PriyanshuShekhar –