Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

375
Vistas
cypress button.click doesn't redirect me

I'm using cypress for unit tests. I'm doing a verification for the login and i'm sure about the logs but when i click, i am not redirected and i don't know how can i know or see where is the error.

There is my code.



describe('espace_parent is functional', () => {
  it('test login parent', () => {

    cy.visit('http://localhost:3000')
    cy.url().then((url) => {
      cy.task('log',  url)
    })

    cy.contains('parent').click()

    cy.url().then((url) => {
      cy.task('log',  url)
    })

    
    cy.contains('Espace Parent')

    cy.get('*[class^="sc-ezbkAF dYcoMC  "]').clear().type('guigui@guigui.fr')
    cy.get(":input[placeholder='Mot de passe']").clear().type('guigui')
    // cy.contains('Se connecter').click() 
    cy.get('*[class^="sc-giYglK iVKXal"]').click()

    cy.url().then((url) => {
      cy.task('log',  url)
    })


  })
})

it gives me this:

espace_parent is functional http://localhost:3000/ http://localhost:3000/parent/connexion http://localhost:3000/parent/connexion ✓ test login parent (2839ms)

But normally it should give

http://localhost:3000/ http://localhost:3000/parent/connexion http://localhost:3000/parent

THe problem is in the 2 nd part of my code:

cy.get('*[class^="sc-ezbkAF dYcoMC  "]').clear().type('guigui@guigui.fr')
cy.get(":input[placeholder='Mot de passe']").clear().type('guigui')
// cy.contains('Se connecter').click() 
cy.get('*[class^="sc-giYglK iVKXal"]').click()

How can i know, what is wrong, and there is the html than i 'm using


<input placeholder="Adresse e-mail" type="text" class="sc-ezbkAF dYcoMC" value="test@gmail.com">
<input placeholder="Mot de passe" type="password" class="sc-ezbkAF dYcoMC" value="test56">
<div class="sc-giYglK iVKXal">
<p class="sc-iJKOTD ecZSkv">Se connecter</p>
</div>

Thansk for your help

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda