I have a website that generates a report within an iframe, and the website's HTML structure is laid out to look like the following:
<html> <!-- a -->
<body>
.
. (C)
.
<iframe>
<html> <!-- b -->
<body>
.
. (D)
.
</body>
</html>
</iframe>
</body>
</html>
I am wondering how I can access elements in the body containing "(D)" from above. So far I have tried using xpath, but if I copy the xpath from an element in (D) in begins from html tag b, so when the program starts searching from html tag a, it finds nothing. I tested to see if the has any child web elements, and it has 0. Attempts to search for elements in (D) by ID have also also resulted in NoSuchElementException. Not a time problem because I am using WebDriverWait for 120 seconds to make sure everything on page has loaded. Thank you for any help you can provide.