Search code examples
iframecypress

Cypress iframe is not loading 100% when started from cypress


We have a page in our application where you can submit your cv's and apply for a job. When the page is loaded outside cypress, it renders correctly with all the fields but when loaded from cypress, it is not loaded fully. I tried with waits, with resolution changes, nothing works. As you can see in the cypress picture, it only displays the first 2 text input fields. I cannot scroll down, i cannot scroll into view.

Cypress Page

Normal Page


Solution

  • Managed to have a solution: wrap the iframe into an element and then interacting with the elements inside:

    cy.get('#iFrameResizer0').its('0.contentDocument.body').then(cy.wrap).find('#inputFirstName')