Estoy tratando de hacer clic en un enlace a un dominio diferente
Usé cy.origin para hacerlo pero no funciona
se hace clic en el enlace y se abre, pero la ventana parpadea entre las páginas
y un texto enorme que dice:
"ESTÁ VISITANDO ESTA PÁGINA EN UNA VENTANA DE MARCO NO AUTORIZADO"
este es el código utilizado para hacer clic en el enlace
it('iframe',function(){ cy.get('#ifmail', { timeout: 20000 }).within(function($iFrame){ const iFrameContent = $iFrame.contents().find('a').eq(0) cy.wrap(iFrameContent).invoke('attr', 'target', '_parent').click() cy.origin('www.stage-mycwt.com', () => { // below is the actual link //https://accounts.stage-mycwt.com/ext/pwdreset2/Reset?adapterId=2AdapterMyCwtWebO cy.get('#newPassword').type('pass{enter}') }) }) })¿Quizás estás haciendo clic en el enlace demasiado pronto?
cy.origin('www.stage-mycwt.com', () => { cy.wrap(iFrameContent).invoke('attr', 'target', '_parent').click() cy.get('#newPassword').type('pass{enter}') ... })