I am trying out to use cypress.io tool for my web automation. My application has iframes and cypress.io on their website has mentioned that it has limited support for iframe pages. I wrote the following code:
cy.get('#installed_features_content').then($iframe => {
const body = $iframe.contents().find('body');
cy.wrap(body).as('installed_features_content_body');
});
and
cy.get('@installed_features_content_body').contains('Search for Updates');
The first line trying to get the contents of iframe and the second line is trying to use the contents to lookup an element that contains the text 'Search for Updates' which it is not finding though the element with that text is present under the body tag of the iframe. I am losing confidence in cypress.io.