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.

Need to be able to hover in/out of DOM elements.

Example for hover
cy.get("@firstRow").hover()

I’m not sure what a stop hover command would look like.

Currently I would achieve this with mouseOver and mouseOut events. The hover command could follow a similar convention.

Other considerations:

  • In what direction does the mouse come from for hover
  • How long should the hover occur.
  • How do you “pause” a hover to allow for possible css animations.
  • Which actions cause you no longer to hover.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:175
  • Comments:71 (24 by maintainers)

github_iconTop GitHub Comments

28reactions
dmtrKovalenkocommented, Nov 22, 2020

It is possible to run a native system hover event using CDP. Find the ready-to-use hover command in this package https://github.com/dmtrKovalenko/cypress-real-events. Checkcy.realHover command.

21reactions
jennifer-shehanecommented, Jun 5, 2015

When I issue a .click() command, this should issue a .hover() over the element I’ve specified to click onto (in order to fully simulate mouse behavior).

Read more comments on GitHub >

github_iconTop Results From Across the Web

hover - Cypress Documentation
Add as a custom command. Although Cypress does not have a built-in cy.hover() command, you can create your own custom command using Cypress....
Read more >
Hover in Cypress - Filip Hric
Short guide on how to hover over elements in Cypress. As there are multiple ways hover actions work, there are multiple ways of...
Read more >
Mouseover in cypress - Stack Overflow
I am a newbie in cypress and trying to create some basic scripts for my learning, Handling dropdown by clicking the elements is...
Read more >
How to Hover on Elements in Cypress - Webtips
Although Cypress does not support officially a cy.hover command, there is some workaround that may work for your specific case.
Read more >
Simulating hovers in Cypress - Reflect.run
In other words, there's no cy.hover() command that you can call to ... dev server that contains this page and add Cypress 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 Hashnode Post

No results found