{"record":{"id":"e9c396f5afaea9e1","repo":"grafana/k6","slug":"getting-inner-text-of-q-w-e9c396","errorCode":null,"errorMessage":"getting inner text of %q: %w","messagePattern":"getting inner text of %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/common/locator.go","lineNumber":473,"sourceCode":"\n\topts.Strict = true\n\ts, err := l.frame.innerHTML(l.selector, opts)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"getting inner HTML of %q: %w\", l.selector, err)\n\t}\n\n\treturn s, nil\n}\n\n// InnerText returns the element's inner text that matches\n// the locator's selector with strict mode on.\nfunc (l *Locator) InnerText(opts *FrameInnerTextOptions) (string, error) {\n\tl.log.Debugf(\"Locator:InnerText\", \"fid:%s furl:%q sel:%q opts:%+v\", l.frame.ID(), l.frame.URL(), l.selector, opts)\n\n\topts.Strict = true\n\ts, err := l.frame.innerText(l.selector, opts)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"getting inner text of %q: %w\", l.selector, err)\n\t}\n\n\treturn s, nil\n}\n\n// Last will return the last child of the element matching the locator's\n// selector.\nfunc (l *Locator) Last() *Locator {\n\treturn NewLocator(l.ctx, nil, l.selector+\" >> nth=-1\", l.frame, l.log)\n}\n\n// Nth will return the nth child of the element matching the locator's\n// selector.\nfunc (l *Locator) Nth(nth int) *Locator {\n\treturn NewLocator(l.ctx, nil, l.selector+\" >> nth=\"+strconv.Itoa(nth), l.frame, l.log)\n}\n\n// TextContent returns the element's text content that matches","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/modules/k6/browser/common/locator.go#L455-L491","documentation":"Error \"getting inner text of %q: %w\" thrown in grafana/k6.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/common/locator.go:473 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}