Cypres does not support iframes 100% and has difficulties working with them because all built-in cy DOM traversal commands do hard stop the moment they hit #document node inside the iframe.
In this project I will show how to interact with DOM elements inside an iframe
This project use cypress-iframe plugin to add iframe support to Cypress with custom commands simplifying working with elements inside an iframe.
npm install
npm run cy:open
Run all specs headlessly in the Electron browser
npm run cy:run:checkout:all
Run 'Checkout is OK' spec headlessly in the Electron browser
npm run cy:run:checkout:ok
Run 'Checkout is KO' spec headlessly in the Electron browser
npm run cy:run:checkout:ko
Run 'Checkout is PENDING' spec headlessly in the Electron browser
npm run cy:run:checkout:pending
Pass command’s arguments using npm run: when calling a command using npm run, you need to pass the command’s arguments using the -- string.
Run 'Checkout is PENDING' spec headlessly in the Chrome browser
npm run cy:run:checkout:pending -- --browser chrome --headless
npm run cy:run:checkout:pending -- --reporter junit --reporter-options "mochaFile=cypress/results/[hash].xml"