Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

Revert "feat(getByRole): add support for `aria-busy` (#41269)" (#41795)

Dmitry Gozman3c7115986984
diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md
index 8836c3c5f3..770da8c509 100644
--- a/docs/src/api/class-frame.md
+++ b/docs/src/api/class-frame.md
@@ -1069,8 +1069,6 @@ Attribute name to get the value for.
### option: Frame.getByRole.description = %%-locator-get-by-role-option-description-%%
-### option: Frame.getByRole.busy = %%-locator-get-by-role-option-busy-%%
-
## method: Frame.getByTestId
* since: v1.27
- returns: <[Locator]>
diff --git a/docs/src/api/class-framelocator.md b/docs/src/api/class-framelocator.md
index 1305e716ad..7f19ceb465 100644
--- a/docs/src/api/class-framelocator.md
+++ b/docs/src/api/class-framelocator.md
@@ -144,8 +144,6 @@ in that iframe.
### option: FrameLocator.getByRole.description = %%-locator-get-by-role-option-description-%%
-### option: FrameLocator.getByRole.busy = %%-locator-get-by-role-option-busy-%%
-
## method: FrameLocator.getByTestId
* since: v1.27
- returns: <[Locator]>
diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.md
index bba1f1f9a6..f9bc16b0d6 100644
--- a/docs/src/api/class-locator.md
+++ b/docs/src/api/class-locator.md
@@ -1488,8 +1488,6 @@ Attribute name to get the value for.
### option: Locator.getByRole.description = %%-locator-get-by-role-option-description-%%
-### option: Locator.getByRole.busy = %%-locator-get-by-role-option-busy-%%
-
## method: Locator.getByTestId
* since: v1.27
- returns: <[Locator]>
diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md
index 913fc56185..4db5da98e3 100644
--- a/docs/src/api/class-page.md
+++ b/docs/src/api/class-page.md
@@ -2310,8 +2310,6 @@ Attribute name to get the value for.
### option: Page.getByRole.description = %%-locator-get-by-role-option-description-%%
-### option: Page.getByRole.busy = %%-locator-get-by-role-option-busy-%%
-
## method: Page.getByTestId
* since: v1.27
- returns: <[Locator]>
diff --git a/docs/src/api/params.md b/docs/src/api/params.md
index 2eec2d6fd3..27ec2b1b06 100644
--- a/docs/src/api/params.md
+++ b/docs/src/api/params.md
@@ -1411,14 +1411,6 @@ Whether to find an exact match: case-sensitive and whole-string. Default to fals
Required aria role.
-## locator-get-by-role-option-busy
-* since: v1.61
-- `busy` <[boolean]>
-
-An attribute that is usually set by `aria-busy`.
-
-Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
-
## locator-get-by-role-option-checked
* since: v1.27
- `checked` <[boolean]>
diff --git a/packages/injected/src/roleSelectorEngine.ts b/packages/injected/src/roleSelectorEngine.ts
index 7d18a013d7..ad3c3a5ac0 100644
--- a/packages/injected/src/roleSelectorEngine.ts
+++ b/packages/injected/src/roleSelectorEngine.ts
@@ -17,7 +17,7 @@
import { parseAttributeSelector } from '@isomorphic/selectorParser';
import { normalizeWhiteSpace } from '@isomorphic/stringUtils';
-import { beginAriaCaches, endAriaCaches, getAriaBusy, getAriaChecked, getAriaDisabled, getAriaExpanded, getAriaLevel, getAriaPressed, getAriaRole, getAriaSelected, getElementAccessibleDescription, getElementAccessibleNameText, isElementHiddenForAria, kAriaCheckedRoles, kAriaExpandedRoles, kAriaLevelRoles, kAriaPressedRoles, kAriaSelectedRoles } from './roleUtils';
+import { beginAriaCaches, endAriaCaches, getAriaChecked, getAriaDisabled, getAriaExpanded, getAriaLevel, getAriaPressed, getAriaRole, getAriaSelected, getElementAccessibleDescription, getElementAccessibleNameText, isElementHiddenForAria, kAriaCheckedRoles, kAriaExpandedRoles, kAriaLevelRoles, kAriaPressedRoles, kAriaSelectedRoles } from './roleUtils';
import { matchesAttributePart } from './selectorUtils';
import type { AttributeSelectorOperator, AttributeSelectorPart } from '@isomorphic/selectorParser';
@@ -37,11 +37,10 @@ type RoleEngineOptions = {
expanded?: boolean;
level?: number;
disabled?: boolean;
- busy?: boolean;
includeHidden?: boolean;
};
-const kSupportedAttributes = ['selected', 'checked', 'pressed', 'expanded', 'level', 'disabled', 'busy', 'name', 'description', 'include-hidden'];
+const kSupportedAttributes = ['selected', 'checked', 'pressed', 'expanded', 'level', 'disabled', 'name', 'description', 'include-hidden'];
kSupportedAttributes.sort();
function validateSupportedRole(attr: string, roles: string[], role: string) {
@@ -107,12 +106,6 @@ function validateAttributes(attrs: AttributeSelectorPart[], role: string): RoleE
options.disabled = attr.op === '<truthy>' ? true : attr.value;
break;
}
- case 'busy': {
- validateSupportedValues(attr, [true, false]);
- validateSupportedOp(attr, ['<truthy>', '=']);
- options.busy = attr.op === '<truthy>' ? true : attr.value;
- break;
- }
case 'name': {
if (attr.op === '<truthy>')
throw new Error(`"name" attribute must have a value`);
@@ -164,8 +157,6 @@ function queryRole(scope: SelectorRoot, options: RoleEngineOptions, internal: bo
return;
if (options.disabled !== undefined && getAriaDisabled(element) !== options.disabled)
return;
- if (options.busy !== undefined && getAriaBusy(element) !== options.busy)
- return;
if (!options.includeHidden) {
const isHidden = isElementHiddenForAria(element);
if (isHidden)
diff --git a/packages/injected/src/roleUtils.ts b/packages/injected/src/roleUtils.ts
index b167f354a6..e518b76c43 100644
--- a/packages/injected/src/roleUtils.ts
+++ b/packages/injected/src/roleUtils.ts
@@ -1179,12 +1179,6 @@ function hasExplicitAriaDisabled(element: Element | undefined, isAncestor = fals
return false;
}
-export function getAriaBusy(element: Element): boolean {
- // https://www.w3.org/TR/wai-aria-1.2/#aria-busy
- // aria-busy is a global state with a default value of "false".
- return getAriaBoolean(element.getAttribute('aria-busy')) === true;
-}
-
function getAccessibleNameFromAssociatedLabels(labels: Iterable<HTMLLabelElement>, options: AccessibleNameOptions): CompositeString {
return joinCompositeString([...labels].map(label => getTextAlternativeInternal(label, {
...options,
diff --git a/packages/isomorphic/locatorUtils.ts b/packages/isomorphic/locatorUtils.ts
index 0708cbccde..77cb2d715a 100644
--- a/packages/isomorphic/locatorUtils.ts
+++ b/packages/isomorphic/locatorUtils.ts
@@ -17,7 +17,6 @@
import { escapeForAttributeSelector, escapeForTextSelector } from './stringUtils';
export type ByRoleOptions = {
- busy?: boolean;
checked?: boolean;
description?: string | RegExp;
disabled?: boolean;
@@ -87,7 +86,5 @@ export function getByRoleSelector(role: string, options: ByRoleOptions = {}): st
props.push(['description', escapeForAttributeSelector(options.description, !!options.exact)]);
if (options.pressed !== undefined)
props.push(['pressed', String(options.pressed)]);
- if (options.busy !== undefined)
- props.push(['busy', String(options.busy)]);
return `internal:role=${role}${props.map(([n, v]) => `[${n}=${v}]`).join('')}`;
}
diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts
index ed7f5c099b..e0f0b6486d 100644
--- a/packages/playwright-client/types/types.d.ts
+++ b/packages/playwright-client/types/types.d.ts
@@ -3080,13 +3080,6 @@ export interface Page {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
@@ -7379,13 +7372,6 @@ export interface Frame {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
@@ -15262,13 +15248,6 @@ export interface Locator {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
@@ -21077,13 +21056,6 @@ export interface FrameLocator {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index ed7f5c099b..e0f0b6486d 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -3080,13 +3080,6 @@ export interface Page {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
@@ -7379,13 +7372,6 @@ export interface Frame {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
@@ -15262,13 +15248,6 @@ export interface Locator {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
@@ -21077,13 +21056,6 @@ export interface FrameLocator {
* @param options
*/
getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
- /**
- * An attribute that is usually set by `aria-busy`.
- *
- * Learn more about [`aria-busy`](https://www.w3.org/TR/wai-aria-1.2/#aria-busy).
- */
- busy?: boolean;
-
/**
* An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
*
diff --git a/tests/library/locator-generator.spec.ts b/tests/library/locator-generator.spec.ts
index 28a96e633b..fa9a863592 100644
--- a/tests/library/locator-generator.spec.ts
+++ b/tests/library/locator-generator.spec.ts
@@ -227,12 +227,6 @@ it('reverse engineer getByRole', async ({ page }) => {
java: `getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setChecked(true).setLevel(3).setPressed(false))`,
csharp: `GetByRole(AriaRole.Button, new() { Checked = true, Level = 3, Pressed = false })`,
});
- expect.soft(generate(page.getByRole('cell', { busy: false }))).toEqual({
- javascript: `getByRole('cell', { busy: false })`,
- python: `get_by_role("cell", busy=False)`,
- java: `getByRole(AriaRole.CELL, new Page.GetByRoleOptions().setBusy(false))`,
- csharp: `GetByRole(AriaRole.Cell, new() { Busy = false })`,
- });
expect.soft(generate(page.getByRole('alert', { name: 'Upload', description: 'doc.pdf' }))).toEqual({
javascript: `getByRole('alert', { name: 'Upload', description: 'doc.pdf' })`,
python: `get_by_role("alert", name="Upload", description="doc.pdf")`,
diff --git a/tests/page/selectors-role.spec.ts b/tests/page/selectors-role.spec.ts
index 10b4b353a0..f7db3bcf10 100644
--- a/tests/page/selectors-role.spec.ts
+++ b/tests/page/selectors-role.spec.ts
@@ -208,49 +208,6 @@ test('should support expanded', async ({ page }) => {
]);
});
-test('should support busy', async ({ page }) => {
- await page.setContent(`
- <div role="cell">Hi</div>
- <div role="cell" aria-busy="true">Hello</div>
- <div role="cell" aria-busy="false">Bye</div>
- <button>Click</button>
- <button aria-busy="true">Loading</button>
- `);
-
- expect(await page.locator(`role=cell`).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<div role="cell">Hi</div>`,
- `<div role="cell" aria-busy="true">Hello</div>`,
- `<div role="cell" aria-busy="false">Bye</div>`,
- ]);
-
- expect(await page.locator(`role=cell[busy]`).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<div role="cell" aria-busy="true">Hello</div>`,
- ]);
- expect(await page.locator(`role=cell[busy=true]`).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<div role="cell" aria-busy="true">Hello</div>`,
- ]);
- expect(await page.getByRole('cell', { busy: true }).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<div role="cell" aria-busy="true">Hello</div>`,
- ]);
-
- expect(await page.locator(`role=cell[busy=false]`).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<div role="cell">Hi</div>`,
- `<div role="cell" aria-busy="false">Bye</div>`,
- ]);
- expect(await page.getByRole('cell', { busy: false }).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<div role="cell">Hi</div>`,
- `<div role="cell" aria-busy="false">Bye</div>`,
- ]);
-
- // aria-busy is a global ARIA state and should work for any role.
- expect(await page.getByRole('button', { busy: true }).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<button aria-busy="true">Loading</button>`,
- ]);
- expect(await page.getByRole('button', { busy: false }).evaluateAll(els => els.map(e => e.outerHTML))).toEqual([
- `<button>Click</button>`,
- ]);
-});
-
test('should support disabled', async ({ page }) => {
await page.setContent(`
<button>Hi</button>
@@ -554,7 +511,7 @@ test('errors', async ({ page }) => {
expect(e0.message).toContain(`Role must not be empty`);
const e1 = await page.$('role=foo[sElected]').catch(e => e);
- expect(e1.message).toContain(`Unknown attribute "sElected", must be one of "busy", "checked", "description", "disabled", "expanded", "include-hidden", "level", "name", "pressed", "selected"`);
+ expect(e1.message).toContain(`Unknown attribute "sElected", must be one of "checked", "description", "disabled", "expanded", "include-hidden", "level", "name", "pressed", "selected"`);
const e2 = await page.$('role=foo[bar . qux=true]').catch(e => e);
expect(e2.message).toContain(`Unknown attribute "bar.qux"`);