I have a need to locate elements, whether within the top-level document, or within nested containers (iframe/embed/object).
I've written a recursive version of the elements method, but during testing, I noticed that for container elements that load and render dynamic content, the elements render just fine, but the dynamic content doesn't seem to be available to watir.
HTML
<embed src="https://example.com/">
Ruby
element.embeds.each do | embed |
puts embed.elements( css: '*' ).length
end
This just gives me 0 elements, when I would expect to be able to see the contents of the embed
too.
What am I missing?