-1

I got a web page which has other Html code within itself. The problem is Selenide/Selenium can access only outer html but can't reach the inner one. Is there any trick which let me reach inner input element?

The html code looks like this:

<!Doctype html>
<html>
...
<div>
<iframe>
#document
<!Doctype html>
<html>
<div>
<input class="text-area">
</div>
</html>
</iframe>
</div>
...
</html>

While debugging my test I always get ElementNotFound exception using those locators $x("//input") or $("input.text-area")

  • It might be an 'iframe', find that locator of that iframe then switch to that iframe using - 'driver.switch_to.frame()', then you can handle the elements inside that iframe. – AbiSaran Feb 06 '23 at 07:59
  • It is, didn't pay attention to it. I'm, going to try switch it to it and find a solution – Stanislav Semyonov Feb 06 '23 at 08:18

1 Answers1

0

The problem was with Iframe tag on the page. I've managed to switch to it and get my elements within