Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

203
Visualizações
Open a link of a different origin wont work

I'm trying to click on a link to a different domain

I used cy.origin in order to do so but its not working

the link gets clicked and opens but the window is flickering between the page

and a huge text saying :

"YOU ARE VIEWING THIS PAGE IN AN UNAUTHORIZED FRAME WINDOW"

this is the code used to click the link

   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}')
      })
    })

   })
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Maybe you are clicking the link too soon?

cy.origin('www.stage-mycwt.com', () => {
  cy.wrap(iFrameContent).invoke('attr', 'target', '_parent').click()
  cy.get('#newPassword').type('pass{enter}')
  ...
})
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda