question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress scrolls very slow and throws error when attempting to click element that should be scrolled to

See original GitHub issue

Current behavior:

Cypress scrolls very slowly on 3.7.0 which result on timeout on most tests. If we press the stop button, cypress will instantly scroll to the desired object. version 3.7.0.zip

Desired behavior:

Scroll instantly just like on 3.2.0 version 3.2.0.zip

Steps to reproduce: (app code and test code)

it('shows correct data', () => {
    cy.visit('https://developer.thebigbox.id/api')
    cy.get('#all_categorize').children().should('have.length', 8).pause()
    cy.get('.fa-angle-left').parent().parent().should('have.class', 'disabled-page-button')
    cy.get('.fa-angle-right').parent().parent().should('have.not.class', 'disabled-page-button')
    cy.get('.fa-angle-right').parent().click()
    cy.get('#all_categorize').children().should('have.length', 8)
    cy.get('.fa-angle-left').parent().parent().should('have.not.class', 'disabled-page-button')
    cy.get('.fa-angle-right').parent().parent().should('have.not.class', 'disabled-page-button')
    cy.get('.fa-angle-right').parent().click()
    cy.get('#all_categorize').children().should('have.length', 3)
    cy.get('.fa-angle-left').parent().parent().should('have.not.class', 'disabled-page-button')
    cy.get('.fa-angle-right').parent().parent().should('have.class', 'disabled-page-button')
  })

Versions

Cypress 3.7.0 Linux Mint 19.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
reyisaacmcommented, Dec 6, 2019

hi @jennifer-shehane thanks for replying below is the gif version of the videos

3.7.0 3 7 0

3.2.0 3 2 0

from the screenshot we can see that on 3.7.0 the page barely scrolls at all or very very slow, and only when i press the stop button the page scrolls to the desired object. on 3.2.0 it scrolled instantly

and yes we have the scroll-behaviour:smooth in our css code

0reactions
jennifer-shehanecommented, Jul 7, 2020

Duplicate of #3200

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use cypress-recurse To Scroll The Page Until It ... - YouTube
In this video, I use cypress -recurse function to keep scrolling the page until we find the word "debug". We yield that found...
Read more >
scrollIntoView - Cypress Documentation
scrollIntoView. Scroll an element into view. It is unsafe to chain further commands that rely on the subject after .scrollIntoView() .
Read more >
Cypress click is not scrolling into view - Stack Overflow
Cypress click is not scrolling into view · 1. This error means that the element is in the DOM, but is currently being...
Read more >
How to Scroll into view in Selenium Webdriver
You might have a requirement to scroll down the page but this requirement was different, so here I used Java Script executor, which...
Read more >
Waiting in Cypress and how to avoid it - Filip Hric
Reaching for a hard wait is often a way to tell Cypress to slow down. ... Cypress will wait for the element to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found