如何在java的selenium web驱动程序中,在div中获得html/body中编写的文本
在这段代码中,我想输入id cke_1_内容的文本,输入字段是html/body。我尝试使用xpath和id,但不起作用 如何在文本区域内写入文本如何在java的selenium web驱动程序中,在div中获得html/body中编写的文本,selenium,testing,selenium-webdriver,automation,qa,Selenium,Testing,Selenium Webdriver,Automation,Qa,在这段代码中,我想输入id cke_1_内容的文本,输入字段是html/body。我尝试使用xpath和id,但不起作用 如何在文本区域内写入文本 [<div id="cke_1_contents" class="cke_contents cke_reset" role="presentation" style="height: 200px;"><span id="cke_86"
[<div id="cke_1_contents" class="cke_contents cke_reset" role="presentation" style="height: 200px;"><span id="cke_86" class="cke_voice_label">Press ALT 0 for help</span>
<iframe src="" frameborder="0" class="cke_wysiwyg_frame cke_reset" style="width: 1010px; height: 100%;" title="Rich Text Editor, mailContent" aria-describedby="cke_86" tabindex="0" allowtransparency="true">
<html dir="ltr" lang="en">
<head>
<title data-cke-title="Rich Text Editor, mailContent">Rich Text Editor, mailContent</title>
<style data-cke-temp="1">html{cursor:text;*cursor:auto}img,input,textarea{cursor:default}</style>
</head>
<body contenteditable="true" class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" spellcheck="false">
<p>Hi, this is test mail</p>
</body>
</html>
</iframe>
</div>
[按ALT 0以获取帮助
富文本编辑器,邮件内容
html{cursor:text;*cursor:auto}img,输入,textarea{cursor:default}
嗨,这里是测试邮件
要使用iFrame,您首先需要驱动程序.switch to().frame您所说的“不工作”是什么意思?找不到元素吗?您正在尝试自动化哪个网站?您可以提供其链接吗?还可以提供