grafana/k6 · error
checking is disabled: unexpected type %T
Error message
checking is %q disabled: unexpected type %T
What it means
Returned by Frame.isDisabled as a type guard: the disabled-state evaluation returned a non-bool value. The injected script contract (boolean result) was broken; the actual Go type is reported alongside the selector.
Solutions
- Retry the check after the page settles
- Report as a k6 browser module bug if reproducible
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at internal/js/modules/k6/browser/common/frame.go:1512 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@3fcf5388d7 (2026-08-18).
Data as JSON: /api/errors/c4fbb01f1ab9b2d9.
Report an issue: GitHub.
Appendix: source
Thrown at internal/js/modules/k6/browser/common/frame.go:1520
func (f *Frame) isDisabled(selector string, opts *FrameIsDisabledOptions) (bool, error) {
isDisabled := func(apiCtx context.Context, handle *ElementHandle) (any, error) {
v, err := handle.isDisabled(apiCtx, 0) // Zero timeout when checking state
if errors.Is(err, ErrTimedOut) { // We don't care about timeout errors here!
return v, nil
}
return v, err
}
act := f.newAction(
selector, DOMElementStateAttached, opts.Strict, isDisabled, []string{}, false, withRetry, true, opts.Timeout,
)
v, err := call(f.ctx, act, opts.Timeout)
if err != nil {
return false, errorFromDOMError(err)
}
bv, ok := v.(bool)
if !ok {
return false, fmt.Errorf("checking is %q disabled: unexpected type %T", selector, v)
}
return bv, nil
}
// IsHidden returns true if the first element that matches the selector
// is hidden. Otherwise, returns false.
func (f *Frame) IsHidden(selector string, opts *FrameIsHiddenOptions) (bool, error) {
f.log.Debugf("Frame:IsHidden", "fid:%s furl:%q sel:%q", f.ID(), f.URL(), selector)
hidden, err := f.isHidden(selector, opts)
if err != nil {
return false, err
}
return hidden, nil
}
View on GitHub (pinned to 3fcf5388d7)