I have an <iframe>
loaded using a srcdoc
attribute, not from src
. I want to click the button using Watir-WebDriver, but I can't figure out how to locate the button, even in an <iframe>
with an id
attribute.
Is it possible to locate elements in an <iframe>
loaded from srcdoc
?
<html>
<body>
<div id="iphone">
<iframe id='ip1' srcdoc="<%= Nokogiri::HTML(my html code)%>"></iframe>
</div>
</body>
</html>