最近,我和我的QA伙伴们试图找到一种方法,让Selenium IDE (带有FireFox v22的V2.2)在NicEdit的文本区域中输入文本,但没有成功。在过去的几天里,我们在互联网上看了看,到目前为止,我们发现,除了其他事情之外,NiceEdit不是一个iFrame (我想这里的许多人已经知道了)。我们没有使用代码或任何其他We驱动器,只是使用Selenium IDE,这让事情变得有点困难,我猜。没有成功。
那么,有没有一种方法可以让Selenium IDE在NiceEdit的文本区域中输入而不需要代码呢?
<div contenteditable="true" class="span12 " data-bind="html: Conteudo" id="conteudo" style="background-color: rgb(255, 255, 255);">
</div>在此之前的其他内容:
<div id="editorPanel" style="width: 100%;" unselectable="on">
<div class=" nicEdit-panelContain" style="overflow: hidden; width: 100%; border: 1px solid rgb(204, 204, 204); background-color: rgb(239, 239, 239);" unselectable="on">
<div class=" nicEdit-panel" style="margin: 0px 2px 2px; overflow: hidden;" unselectable="on">
</div>
</div>
<div id="conteudo" class="span12" contenteditable="true" data-bind="html: Conteudo">
</div>编辑:我发现NicEdit将文本区域转换为div,因此Selenium无法关注该区域。有没有人对如何让Selenium在NicEdit上添加一些文本有任何建议?谢谢!
发布于 2015-01-15 06:15:00
<tr>
<td>storeEval</td>
<td>this.browserbot.findElement("id=someID").innerHTML='fillerText'</td>
<td></td>
</tr>上面的方法对你有效吗?
https://stackoverflow.com/questions/17812601
复制相似问题