Overview
The Hover step simulates moving your mouse over an element without clicking. It’s essential for testing dropdown menus, tooltips, hover effects, and any UI that responds to mouse movement.When to Use Hover
Use Hover when you need to:- Open dropdown menus: Hover over navigation items to reveal submenus
- Show tooltips: Trigger help text or information popups on hover
- Reveal hidden controls: Display action buttons or options that appear on hover
- Test hover effects: Verify visual changes like color shifts, shadows, or overlays
- Access nested navigation: Navigate through multi-level menus that require hovering
How It Works
Hover finds an element using a CSS selector and moves the mouse cursor over it, triggering all the same events a real hover would - mouseenter, mousemove, mouseover. This activates CSS :hover states and JavaScript hover event listeners. The element stays in a hovered state until another action moves the mouse away. This is perfect for testing dropdown menus and other UI that remains visible while you interact with the revealed content.Using the Hover Step
When you add a Hover step, you’ll configure:Finding Your Element
Use the element picker to visually select the element you want to hover over, or enter a CSS selector directly. Target the element that triggers the hover effect - like a menu item, button, or card - not the content that appears on hover.Real-World Examples
Opening a Dropdown Menu
Showing a Tooltip
Revealing Card Actions
Testing Nested Mega Menu
Chart Data on Hover
Best Practices
Target the Trigger Element
- Hover over the element that activates the effect, not the content that appears
- For menus: hover over the menu item, not the dropdown itself
- For tooltips: hover over the trigger button/icon, not the tooltip content
Account for Timing
- Some hover effects have CSS delays or transitions
- Add Wait for Element after hover if content takes time to appear
- Consider transition durations when verifying hover effects
Chain Hovers for Nested Menus
- Use multiple Hover steps to navigate through multi-level menus
- Verify each level appears before hovering the next level
- Remember that hovering a new element unhovers the previous one
Verify Hover Results
Always confirm the hover effect worked:- Use Check Visibility to verify revealed content appears
- Use Check Text to verify tooltip or popup content
- Check for CSS class changes if your app adds hover classes
Troubleshooting
Hover Effect Doesn’t Trigger
Symptom: Nothing happens when hovering the element Solution:- Verify the element exists and is visible when the hover happens
- Check that CSS :hover styles or JavaScript hover listeners are properly attached
- Ensure the element isn’t covered by another element
- Use browser dev tools to manually hover and confirm the effect works
- Some effects require specific timing - try adding a wait before the hover
Content Appears Then Disappears
Symptom: Dropdown or tooltip shows briefly then vanishes Solution:- The next step might be moving the mouse away (like clicking elsewhere)
- Keep the mouse on the hovered element by ensuring your next action is within the revealed content
- For nested menus, hover through the path without clicking away
- Check for JavaScript that auto-hides content after a timeout
Element Not Hoverable
Symptom: Test fails saying it can’t hover the element Solution:- Verify the element is visible and in the viewport
- Check that the element isn’t disabled or has pointer-events: none
- Ensure the element has sufficient size to hover over
- Add Wait for Element if the element loads dynamically
Wrong Element Receives Hover
Symptom: Hover triggers a different element than intended Solution:- Make your selector more specific to target the exact element
- Use the element picker to generate a precise selector
- Check if multiple elements match your selector
- Verify you’re targeting the trigger element, not child elements
Hover Works Manually But Not in Tests
Symptom: Hover effects work when testing manually but fail in automation Solution:- Some hover effects depend on mouse speed or movement patterns
- Check if your app requires specific hover duration
- Look for JavaScript debouncing that might delay the effect
- Verify CSS transitions complete before checking results
Mobile and Touch Devices
Important: Hover interactions don’t exist on touch devices. When testing mobile:- Hover effects typically trigger on tap instead
- Some apps show hover content on long-press
- Consider alternative test strategies for touch-only devices
- Test that hover-dependent features remain accessible on mobile
Related Steps
- Click - Click elements revealed by hover
- Check Visibility - Verify hover effects appeared
- Check Text - Verify tooltip or hover content
- Wait for Element - Wait for hover effects to complete

