{"record":{"id":"82a90c6b690dea60","repo":"microsoft/playwright","slug":"attr-name-does-not-support-attr-op-match","errorCode":null,"errorMessage":"\"${attr.name}\" does not support \"${attr.op}\" matcher","messagePattern":"\"(.+?)\" does not support \"(.+?)\" matcher","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/injected/src/roleSelectorEngine.ts","lineNumber":58,"sourceCode":"  includeHidden?: boolean;\n};\n\nconst kSupportedAttributes = ['selected', 'checked', 'pressed', 'expanded', 'level', 'disabled', 'name', 'description', 'include-hidden'];\nkSupportedAttributes.sort();\n\nfunction validateSupportedRole(attr: string, roles: string[], role: string) {\n  if (!roles.includes(role))\n    throw new Error(`\"${attr}\" attribute is only supported for roles: ${roles.slice().sort().map(role => `\"${role}\"`).join(', ')}`);\n}\n\nfunction validateSupportedValues(attr: AttributeSelectorPart, values: any[]) {\n  if (attr.op !== '<truthy>' && !values.includes(attr.value))\n    throw new Error(`\"${attr.name}\" must be one of ${values.map(v => JSON.stringify(v)).join(', ')}`);\n}\n\nfunction validateSupportedOp(attr: AttributeSelectorPart, ops: AttributeSelectorOperator[]) {\n  if (!ops.includes(attr.op))\n    throw new Error(`\"${attr.name}\" does not support \"${attr.op}\" matcher`);\n}\n\nfunction validateAttributes(attrs: AttributeSelectorPart[], role: string): RoleEngineOptions {\n  const options: RoleEngineOptions = { role };\n  for (const attr of attrs) {\n    switch (attr.name) {\n      case 'checked': {\n        validateSupportedRole(attr.name, kAriaCheckedRoles, role);\n        validateSupportedValues(attr, [true, false, 'mixed']);\n        validateSupportedOp(attr, ['<truthy>', '=']);\n        options.checked = attr.op === '<truthy>' ? true : attr.value;\n        break;\n      }\n      case 'pressed': {\n        validateSupportedRole(attr.name, kAriaPressedRoles, role);\n        validateSupportedValues(attr, [true, false, 'mixed']);\n        validateSupportedOp(attr, ['<truthy>', '=']);\n        options.pressed = attr.op === '<truthy>' ? true : attr.value;","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/injected/src/roleSelectorEngine.ts#L40-L76","documentation":"Error \"\"${attr.name}\" does not support \"${attr.op}\" matcher\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/injected/src/roleSelectorEngine.ts:58 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"}