grafana/k6 · error

filling %q with %q: %w

Error message

filling %q with %q: %w

What it means

Error "filling %q with %q: %w" thrown in grafana/k6.

Source

Thrown at internal/js/modules/k6/browser/common/locator.go:311

	hidden, err := l.frame.isHidden(l.selector, &FrameIsHiddenOptions{Strict: true})
	if err != nil {
		return false, fmt.Errorf("checking is %q hidden: %w", l.selector, err)
	}

	return hidden, nil
}

// Fill out the element using locator's selector with strict mode on.
func (l *Locator) Fill(value string, opts *FrameFillOptions) error {
	l.log.Debugf(
		"Locator:Fill", "fid:%s furl:%q sel:%q val:%q opts:%+v",
		l.frame.ID(), l.frame.URL(), l.selector, value, opts,
	)

	opts.Strict = true
	if err := l.frame.fill(l.selector, value, opts); err != nil {
		return fmt.Errorf("filling %q with %q: %w", l.selector, value, err)
	}

	applySlowMo(l.ctx)

	return nil
}

// LocatorFilterOptions allows filtering a [Locator] by various criteria.
// It's similar to [LocatorOptions] but used for filtering existing locators.
type LocatorFilterOptions struct {
	*LocatorOptions
}

// Filter returns a new [Locator] after applying the options to the current one.
func (l *Locator) Filter(opts *LocatorFilterOptions) *Locator {
	return NewLocator(l.ctx, opts.LocatorOptions, l.selector, l.frame, l.log)
}

View on GitHub (pinned to 93accf6570)

When it happens

Trigger: Thrown at internal/js/modules/k6/browser/common/locator.go:311 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15). Data as JSON: /api/errors/70dfc6e674e7acdf. Report an issue: GitHub.