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

101
Views
header not visible issue

oWhen i scroll a page, the main menu header is visible. cy.get('.myclass').scrollIntoView().within(() => { cy.get('.scroll').scrollTo('bottom') cy.get('.header-nav').should('not.exist') cy.get('.scroll').scrollTo('top') cy.get('.header-nav', {withinSubject: null}) })

Instead of , {withinSubject: null}) i want to use should('exist') but the test is failing when i use exist but pass when i use , {withinSubject: null})..Even with should be visible its failing.

First the header is showing like this in cypress: enter image description here - Its overlapping on the top This is my html for the header: enter image description here

What am i doing wrong or why is {withinSubject: null}) working and not others. When the site opens the header is present so when i use exist it works but once i check on the scroll the header does not work with exist. Also when i am scrolling down the header should not be visible but it is still visible even though when i do the same thing manually it works. Only having this behavior in cypress. Thank you

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!