https://cypress.io logo
Cypress not scrolling
# i-need-help
f
Hello everyone! I'm new to Cypress and I walked into a mayor error that I cannot seem to solve. The problem is here that after a click Cypress automatically scrolls to the element, that's fine, however when I want to scroll to the top or to the covered element2 it simply does not do it like that. I've tried these things so far:
Copy code
TS
.scrollIntoView() (after this it's still covered, however it does scroll, just not enough)
cy.scrollTo('top');
cy.scrollTo('center');
cy.get('.sidebar').scrollTo('top');
Does anyone know a different way of scrolling upwards?
e
cy.get('.sidebar').scrollIntoView()
https://docs.cypress.io/api/commands/scrollintoview
Oops, didn't see you tried that already, sorry.
b
you can change it in the config file https://cypress.io
b
https://github.com/dmtrKovalenko/cypress-real-events/blob/develop/README.md has some bits you might find useful to swipe where you want to