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

502
Vistas
Expected to find element : but never found it(not a normal assertion)

//I have tried alias,asserts,wait,etc..,but can't click the element because the page is not loaded.I don't want to use wait() or pause() command. I need a solution to interact with the elements however the network or testing environment is slow or speed.

My code is as follows :

///

it('Test ship',function(){

cy.viewport(1120,800)

  cy.visit('url')

 cy.get('#NFR_LoginForm-nfr_login_authname').type('KKV2C123')

 cy.get('#NFR_LoginForm-nfr_login_authid').type('paSSword1{enter}')

 cy.on('uncaught:exception', (err, runnable) => {
     return false
 })
 
 cy.wait[ cy.xpath('//span[normalize-space()="Work Space"]')
      
           .click({force: true})]

Here is my screenshot.

Assertion error image

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Bump the wait time on your click(). Is 3 minutes enough?

cy.xpath('//span[normalize-space()="Work Space"]', {timeout:180000})
  .click()
about 4 years ago · Juan Pablo Isaza Denunciar

0

Try something along these lines below:

...
cy.visit('http://70.207.7.25:8070/main')
// mark our window object to "know" when it gets loaded
cy.window().then(w => w.beforeLoad = true)
// initially the new property is there
cy.window().should('have.prop', 'beforeLoad', true)
// after reload the property should be gone
cy.window().should('not.have.prop', 'beforeLoad')
...

This will give a window a new property which will be tracked on page switch and should give it kind of a "pause" to wait for the property not to be available after page loads

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