【发布时间】:2014-04-09 18:34:00
【问题描述】:
<iframe>
<html>
<head>
</html>
<body>
<blockquote>
<p>
"set text here"
</p>
</blockquote>
</body>
</html>
</iframe
您好,我正在尝试在 iframe 中设置标签的 innerHTML,但我似乎无法让它工作
textareaID.setHTML("Some Text");
通过使用 runScript,它会写入 textarea,但似乎没有将其写入 blockquote 标记内
selectFrame(iframeLocator);
sendKeys("//html/body/blockquote/p", "Some Text");
selectFrame 选择框架并 sendKeys 发送我想要的文本,但它也不会将文本写入 p 标签内。当我将它运行到 //html/body 时它工作正常,但它似乎不适用于 //html/body/blockquote/p
【问题讨论】:
标签: javascript selenium selenium-webdriver