Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

376
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!