0

I am trying to mimic the keyboard navigation in my Cypress test. I found a nice lib https://github.com/dmtrKovalenko/cypress-real-events#cyrealpress.

The method realPress() is working partially: not all key codes from https://github.com/dmtrKovalenko/cypress-real-events/blob/main/src/keyCodeDefinitions.ts are processing in my web application. Only cy.realPress('Tab') and cy.realPress('Enter') are working as expected - the cursor is focusing on the "next" element after Tab and the menu is opening after Enter.

But when I try to navigate as I am doing manually by keyboard (for example, using cy.realPress('ArrowDown'); ) then the page is not scrolling. The same result is with other arguments:

  1. cy.realPress('ArrowUp');

  2. cy.realPress('End');

  3. cy.realPress('Home');

Could you please give some advice on how to fix it?

Viktor Ilienko
  • 817
  • 8
  • 15

0 Answers0