How to work with iframes


  • Admin

    Sometimes Selenium cannot find a given element on a page and throws an error, even if you targeted it correctly.
    99% of the times this is due to the fact that the element is inside an <iframe> element.

    To switch to the iframe's context we need to add an ELEMENTACTION block, target the <iframe> element and select the SwitchToFrame action.

    Now, if you want to go back to the main context you can use BROWSERACTION SwitchToParentFrame.



  • Man I wish I can really show you a live example of this but is still nothing working even if I targeted correct iframe


  • Admin

    Maybe there are multiple iframes one inside the other? Have you tried checking?


Log in to reply