Skip to content

Hover

Type: page-hover  ·  Package: Browser v1.0.9

Moves the mouse pointer over an element, without clicking. It’s for triggering behaviors that only appear when the cursor hovers: drop-down menus, tooltips, buttons that reveal themselves, navigation submenus.

It locates the element by its selector, waits until it’s visible, stable and not covered by another element (scrolling it into view if needed) and places the mouse at its center, firing its hover/mouseover events. It’s typically followed by a Click on the option that appeared. The pointer stays there until the next mouse action.

ParameterTypeDefaultDescription
selectorselector—The element to hover over.
ParameterTypeDefaultDescription
pageZoanPageSession—The page session. Omit it inside a body; outside, pass the session variable (e.g. page = page).
timeoutnumber30000Maximum time in ms to wait. Empty, 0 or negative: the project settings value or, if none, 30000.

This activity does not return a value.

Open a menu that appears on hover and click an option:

Page Hover selector = (#menuUsuario)
Page Wait For selector = (.opcion-cerrar-sesion) state = visible
Page Click selector = (.opcion-cerrar-sesion)
MessageCause and fix
Hover failed: Timeout 30000ms exceeded. … | matches: 0 (…)It didn’t find the element. Check the selector or wait first with Wait For.
Hover failed: … | matches: 1 (the element exists but the action did not complete: …)The element is hidden or covered by another. Close whatever covers it.
'page' must be a ZoanPageSession.page is empty outside a body.
  • Click — click the option revealed by the hover.
  • Wait For — wait for the submenu to appear.