I'm trying to show url content in a WebEngine (using JavaFX). I'm trying to record user actions like mouse click, key press, in this page, basically for test automation. When doing this, how will I know that I'm encountering an iFrame? Once we click the iFrame, we are in a new window and all the keyevents and clicks are recorded for this new window.
(I just want some way to identify when to call switchTo(iFrame) before executing the clicks and keyevents recorded for the iframe Window.)