microsoft/playwright · error · Error
Unknown attribute "${attr.name}", must be one of ${kSupporte
Error message
Unknown attribute "${attr.name}", must be one of ${kSupportedAttributes.map(a => `"${a}"`).join(', ')}. What it means
Error "Unknown attribute "${attr.name}", must be one of ${kSupportedAttributes.map(a => `"${a}"`).join(', ')}." thrown in microsoft/playwright.
Source
Thrown at packages/injected/src/roleSelectorEngine.ts:136
}
case 'description': {
if (attr.op === '<truthy>')
throw new Error(`"description" attribute must have a value`);
if (typeof attr.value !== 'string' && !(attr.value instanceof RegExp))
throw new Error(`"description" attribute must be a string or a regular expression`);
options.description = attr.value;
options.descriptionOp = attr.op;
options.descriptionExact = attr.caseSensitive;
break;
}
case 'include-hidden': {
validateSupportedValues(attr, [true, false]);
validateSupportedOp(attr, ['<truthy>', '=']);
options.includeHidden = attr.op === '<truthy>' ? true : attr.value;
break;
}
default: {
throw new Error(`Unknown attribute "${attr.name}", must be one of ${kSupportedAttributes.map(a => `"${a}"`).join(', ')}.`);
}
}
}
return options;
}
function queryRole(scope: SelectorRoot, options: RoleEngineOptions, internal: boolean): Element[] {
const result: Element[] = [];
const match = (element: Element) => {
if (getAriaRole(element) !== options.role)
return;
if (options.selected !== undefined && getAriaSelected(element) !== options.selected)
return;
if (options.checked !== undefined && getAriaChecked(element) !== options.checked)
return;
if (options.pressed !== undefined && getAriaPressed(element) !== options.pressed)
return;
if (options.expanded !== undefined && getAriaExpanded(element) !== options.expanded)View on GitHub (pinned to c8fc3bf8d3)
When it happens
Trigger: Thrown at packages/injected/src/roleSelectorEngine.ts:136 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12).
Data as JSON: /api/errors/9fb9250481f2518f.
Report an issue: GitHub.