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

501
Views
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 answers
Answer question

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 Report

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 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!