{"record":{"id":"9fb9250481f2518f","repo":"microsoft/playwright","slug":"unknown-attribute-attr-name-must-be-one-of","errorCode":null,"errorMessage":"Unknown attribute \"${attr.name}\", must be one of ${kSupportedAttributes.map(a => `\"${a}\"`).join(', ')}.","messagePattern":"Unknown attribute \"(.+?)\", must be one of (.+?)\"`\\)\\.join\\(', '\\)\\}\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/injected/src/roleSelectorEngine.ts","lineNumber":136,"sourceCode":"      }\n      case 'description': {\n        if (attr.op === '<truthy>')\n          throw new Error(`\"description\" attribute must have a value`);\n        if (typeof attr.value !== 'string' && !(attr.value instanceof RegExp))\n          throw new Error(`\"description\" attribute must be a string or a regular expression`);\n        options.description = attr.value;\n        options.descriptionOp = attr.op;\n        options.descriptionExact = attr.caseSensitive;\n        break;\n      }\n      case 'include-hidden': {\n        validateSupportedValues(attr, [true, false]);\n        validateSupportedOp(attr, ['<truthy>', '=']);\n        options.includeHidden = attr.op === '<truthy>' ? true : attr.value;\n        break;\n      }\n      default: {\n        throw new Error(`Unknown attribute \"${attr.name}\", must be one of ${kSupportedAttributes.map(a => `\"${a}\"`).join(', ')}.`);\n      }\n    }\n  }\n  return options;\n}\n\nfunction queryRole(scope: SelectorRoot, options: RoleEngineOptions, internal: boolean): Element[] {\n  const result: Element[] = [];\n  const match = (element: Element) => {\n    if (getAriaRole(element) !== options.role)\n      return;\n    if (options.selected !== undefined && getAriaSelected(element) !== options.selected)\n      return;\n    if (options.checked !== undefined && getAriaChecked(element) !== options.checked)\n      return;\n    if (options.pressed !== undefined && getAriaPressed(element) !== options.pressed)\n      return;\n    if (options.expanded !== undefined && getAriaExpanded(element) !== options.expanded)","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/injected/src/roleSelectorEngine.ts#L118-L154","documentation":"Error \"Unknown attribute \"${attr.name}\", must be one of ${kSupportedAttributes.map(a => `\"${a}\"`).join(', ')}.\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/injected/src/roleSelectorEngine.ts:136 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":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}