Here's a study case:
<html>
...
<embed name="foo">
<embed name="bar">
...
</html>
I'm trying to reference the embed element named "bar" using Watir Ruby's API. The element is shown by Chrome's DOM Inspector but I can't find it using any of finding methods of Watir:
browser.embeds() # only <embed name="foo"> is found
browser.html.include? 'bar' # => false
Why does that happen? Why Watir does not show the complete HTML? If I have elements in different frames or dynamically inserted by Javascript init functions, will them be accessible using Watir?
Thanks
If the element is in the frame, you have to use something like this:
browser.frame(:id => "frameid").embed(:name => "bar")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With