feat(locator): Add ariaChildren Option to Locator's getByRole Method.

This commit is contained in:
Philipe Allan Almeida 2025-01-15 10:48:15 -03:00 committed by Philipe Allan Almeida
parent 3772bcf79f
commit 5f6ef9f3f4

View file

@ -423,7 +423,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 "checked", "disabled", "expanded", "include-hidden", "level", "name", "pressed", "selected"`);
expect(e1.message).toContain(`Unknown attribute "sElected", must be one of "aria-children", "checked", "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"`);