grafana/k6 · error
checking is disabled
Error message
checking is %q disabled: %w
What it means
Wrapped failure from Frame.isDisabled while checking whether the element matched by the locator's selector is disabled (strict mode forced). Fires when the selector matches zero or multiple elements or the underlying CDP query fails — an enabled element returns (false, nil), not this error.
Solutions
- Make the selector resolve to a single element under strict mode
- Wait for the element to attach before querying its state
- Inspect the wrapped error to distinguish strict-mode/timeout failures from a false result
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at internal/js/modules/k6/browser/common/locator.go:255 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/60a98c43562625e4.
Report an issue: GitHub.
Appendix: source
Thrown at internal/js/modules/k6/browser/common/locator.go:255
opts.Strict = true
enabled, err := l.frame.isEnabled(l.selector, opts)
if err != nil {
return false, fmt.Errorf("checking is %q enabled: %w", l.selector, err)
}
return enabled, nil
}
// IsDisabled returns true if the element matches the locator's
// selector and is disabled. Otherwise, returns false.
func (l *Locator) IsDisabled(opts *FrameIsDisabledOptions) (bool, error) {
l.log.Debugf("Locator:IsDisabled", "fid:%s furl:%q sel:%q opts:%+v", l.frame.ID(), l.frame.URL(), l.selector, opts)
opts.Strict = true
disabled, err := l.frame.isDisabled(l.selector, opts)
if err != nil {
return false, fmt.Errorf("checking is %q disabled: %w", l.selector, err)
}
return disabled, nil
}
// IsInViewport returns true if the element matches the locator's selector and
// intersects the viewport by at least the requested ratio. Otherwise, returns
// false.
func (l *Locator) IsInViewport(opts *FrameIsInViewportOptions) (bool, error) {
l.log.Debugf("Locator:IsInViewport", "fid:%s furl:%q sel:%q opts:%+v", l.frame.ID(), l.frame.URL(), l.selector, opts)
opts.Strict = true
inViewport, err := l.frame.isInViewport(l.selector, opts)
if err != nil {
return false, fmt.Errorf("checking is %q in viewport: %w", l.selector, err)
}
return inViewport, nilView on GitHub (pinned to 01ffac6f24)