MeltwaterArchive/storyplayer

[Feature] IFrame support

stuartherbert opened this issue · 0 comments

Storyplayer needs to be able to interact with IFrames in a web browser.

The proposed syntax for this is:

$st->usingBrowser()->switchToIframe($id);

where $id is the value of the iframe's ID attribute. In theory, that should be all that we need to do.

If we want to detect whether a specific iframe is in the DOM or not, currently the only way is to attempt to switch to the iframe, and see if we get an error from Selenium or not. If we don't get an error, we just need to switch back to the default context (by passing null for $id).