0
我有一个加载使用srcdoc
属性,而不是从src
。我想使用Watir-WebDriver单击按钮,但我无法弄清楚如何定位按钮,即使在具有id
属性的中。无法访问srcdoc iframe内的按钮?
是否可以找到从srcdoc
加载的中的元素?
<html>
<body>
<div id="iphone">
<iframe id='ip1' srcdoc="<%= Nokogiri::HTML(my html code)%>"></iframe>
</div>
</body>
</html>
我不积极(你的问题有点含糊),但这可能有帮助 - http://stackoverflow.com/questions/3275816/debugging-iframes-with-chrome-developer-tools – sfletche