I'm looking for the best way to validate an element within another element using Watir WebDriver. Example: I want to verify that the span below is is found within the anchor that contains it.
<a id="header-main-menu-home" href="/" class="tracked">
"Home"
<span class="arrow arrow-up"></span>
</a>
I'm currently using the location as validation, but do not think this is sustainable.
Any help is much appreciated?