Home > OS >  Cypress can't detect any elements on a particular site
Cypress can't detect any elements on a particular site

Time:06-24

I've started using Cypress (v10.2.0) as an end to end testing framework and wanted to try out logging onto a banking site and filling the input fields.

However, when my Cypress opens enter image description here

I am not sure why this is happening as all the other sites I've tried work as expected, can find the page body and any other elements and don't throw any console errors.

Any help would be appreciated, cheers!

Spec file is as follows:

describe('Online Banking spec', () => {
  it('opens the site', () => {
    cy.visit('https://www.anytimebanking.ulsterbank.co.uk')
  })
})

CodePudding user response:

Actually your entire app and the modal window is contained inside an whose id="ctl00_secframe". So you need to make use of Iframe in cypress to close the Privacy window as well as to fetch other elements.

You can also refer : https://www.cypress.io/blog/2020/02/12/working-with-iframes-in-cypress/

  • Related