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

107
Views
¿Diferencia entre on('windows.alert()') y on('windows:alert') en cypress?
cy.on('window:alert',(str)=>{ expect(str).to.equal('Hello , share this practice page and share your knowledge'); });

Esto estaba ejecutando la afirmación pero,

 cy.on('window.alert()',(str)=>{ expect(str).to.equal('Hello , share this practice page and share your knowledge'); });

Pero esto no estaba ejecutando la afirmación. Soy nuevo en Cypress y quiero entender por qué y cómo estos dos son diferentes.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

En realidad, no hay diferencia entre ellos. El método cy.on() llama a los métodos básicos de javascript . Incluso si no agrega el signo () al final de una función, se llamará al método constructor del mismo método, a menos que tome un parámetro dentro de la función.

about 4 years ago · Juan Pablo Isaza Report
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!