mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-06 03:16:17 +03:00
chore: role selectors non-experimental (#14021)
This commit is contained in:
parent
c3cf7ee4a7
commit
64cd55089a
@ -47,6 +47,7 @@ export class Selectors {
|
|||||||
'data-test', 'data-test:light',
|
'data-test', 'data-test:light',
|
||||||
'nth', 'visible', 'control', 'has',
|
'nth', 'visible', 'control', 'has',
|
||||||
'left-of', 'right-of', 'above', 'below', 'near',
|
'left-of', 'right-of', 'above', 'below', 'near',
|
||||||
|
'role',
|
||||||
]);
|
]);
|
||||||
this._builtinEnginesInMainWorld = new Set([
|
this._builtinEnginesInMainWorld = new Set([
|
||||||
'_react', '_vue',
|
'_react', '_vue',
|
||||||
@ -135,7 +136,6 @@ export class Selectors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parseSelector(selector: string | ParsedSelector, strict: boolean): SelectorInfo {
|
parseSelector(selector: string | ParsedSelector, strict: boolean): SelectorInfo {
|
||||||
this._builtinEngines.add('role');
|
|
||||||
const parsed = typeof selector === 'string' ? parseSelector(selector) : selector;
|
const parsed = typeof selector === 'string' ? parseSelector(selector) : selector;
|
||||||
let needsMainWorld = false;
|
let needsMainWorld = false;
|
||||||
for (const name of allEngineNames(parsed)) {
|
for (const name of allEngineNames(parsed)) {
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
import { test, expect } from './pageTest';
|
import { test, expect } from './pageTest';
|
||||||
|
|
||||||
test.skip(({ mode }) => mode !== 'default', 'Experimental features only work in default mode');
|
|
||||||
|
|
||||||
test('should detect roles', async ({ page }) => {
|
test('should detect roles', async ({ page }) => {
|
||||||
await page.setContent(`
|
await page.setContent(`
|
||||||
<button>Hello</button>
|
<button>Hello</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user