grafana/k6 · error
hovering on
Error message
hovering on %q: %w
What it means
Wrapped failure from Frame.hover (with retry enabled) while moving the pointer over the element matched by the locator's selector (strict mode forced). Fires when the selector matches zero/multiple elements, the element is not hoverable (hidden or zero-size), or the CDP mouse-move events fail after retries.
Solutions
- Ensure the element is visible and has a non-zero bounding box with a unique selector
- Wait for animations/transitions to settle so the element stabilizes under the pointer
- Covering overlays (menus, spinners) can intercept hover; remove or wait them out
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/js/modules/k6/browser/common/locator.go:605 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/87402e09873b79d1.
Report an issue: GitHub.
Appendix: source
Thrown at internal/js/modules/k6/browser/common/locator.go:605
opts.Strict = true
if err := l.frame.typ(l.selector, text, opts); err != nil {
return spanRecordErrorf(span, "typing %q in %q: %w", text, l.selector, err)
}
applySlowMo(l.ctx)
return nil
}
// Hover moves the pointer over the element that matches the locator's
// selector with strict mode on.
func (l *Locator) Hover(opts *FrameHoverOptions) error {
l.log.Debugf("Locator:Hover", "fid:%s furl:%q sel:%q opts:%+v", l.frame.ID(), l.frame.URL(), l.selector, opts)
opts.Strict = true
opts.retry = true
if err := l.frame.hover(l.selector, opts); err != nil {
return fmt.Errorf("hovering on %q: %w", l.selector, err)
}
applySlowMo(l.ctx)
return nil
}
// Tap the element found that matches the locator's selector with strict mode on.
func (l *Locator) Tap(opts *FrameTapOptions) error {
l.log.Debugf("Locator:Tap", "fid:%s furl:%q sel:%q opts:%+v", l.frame.ID(), l.frame.URL(), l.selector, opts)
opts.Strict = true
opts.retry = true
if err := l.frame.tap(l.selector, opts); err != nil {
return fmt.Errorf("tapping on %q: %w", l.selector, err)
}
applySlowMo(l.ctx)View on GitHub (pinned to 01ffac6f24)