diff --git a/packages/puppeteer-core/src/bidi/Frame.ts b/packages/puppeteer-core/src/bidi/Frame.ts index 6ed2ba4c33a..1fde5c2b805 100644 --- a/packages/puppeteer-core/src/bidi/Frame.ts +++ b/packages/puppeteer-core/src/bidi/Frame.ts @@ -20,14 +20,12 @@ import { switchMap, } from '../../third_party/rxjs/rxjs.js'; import type {CDPSession} from '../api/CDPSession.js'; -import type {ElementHandle} from '../api/ElementHandle.js'; import { Frame, throwIfDetached, type GoToOptions, type WaitForOptions, } from '../api/Frame.js'; -import type {WaitForSelectorOptions} from '../api/Page.js'; import {PageEvent} from '../api/Page.js'; import { ConsoleMessage, @@ -35,7 +33,7 @@ import { } from '../common/ConsoleMessage.js'; import {TargetCloseError, UnsupportedOperation} from '../common/Errors.js'; import type {TimeoutSettings} from '../common/TimeoutSettings.js'; -import type {Awaitable, NodeFor} from '../common/types.js'; +import type {Awaitable} from '../common/types.js'; import {debugError, fromEmitterEvent, timeout} from '../common/util.js'; import {isErrorLike} from '../util/ErrorLike.js'; @@ -456,19 +454,6 @@ export class BidiFrame extends Frame { await exposedFunction[Symbol.asyncDispose](); } - override waitForSelector( - selector: Selector, - options?: WaitForSelectorOptions - ): Promise> | null> { - if (selector.startsWith('aria') && !this.page().browser().cdpSupported) { - throw new UnsupportedOperation( - 'ARIA selector is not supported for BiDi!' - ); - } - - return super.waitForSelector(selector, options); - } - async createCDPSession(): Promise { const {sessionId} = await this.client.send('Target.attachToTarget', { targetId: this._id, diff --git a/test/TestExpectations.json b/test/TestExpectations.json index 0cd709be205..3ad16ade0ae 100644 --- a/test/TestExpectations.json +++ b/test/TestExpectations.json @@ -1,11 +1,4 @@ [ - { - "testIdPattern": "[ariaqueryhandler.spec] *", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox"], - "expectations": ["SKIP"], - "comment": "Firefox crashes when a document is provided as a start node" - }, { "testIdPattern": "[autofill.spec] *", "platforms": ["darwin", "linux", "win32"], @@ -202,6 +195,13 @@ "expectations": ["SKIP"], "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, + { + "testIdPattern": "[ariaqueryhandler.spec] *", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["cdp", "firefox"], + "expectations": ["SKIP"], + "comment": "Not supported over CDP" + }, { "testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne (Chromium web test) should find by role \"heading\"", "platforms": ["darwin", "linux", "win32"], @@ -209,6 +209,13 @@ "expectations": ["FAIL"], "comment": "WebDriver BiDi locateNodes does not support shadow roots so far" }, + { + "testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler waitForSelector *", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["firefox", "webDriverBiDi"], + "expectations": ["SKIP"], + "comment": "TODO: Needs investigation" + }, { "testIdPattern": "[autofill.spec] *", "platforms": ["darwin", "linux", "win32"], @@ -961,11 +968,18 @@ "comment": "times out flakily" }, { - "testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne (Chromium web test) should find by role \"button\"", + "testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne (Chromium web test) should find by name \"bar\"", "platforms": ["darwin", "linux", "win32"], "parameters": ["firefox", "webDriverBiDi"], "expectations": ["FAIL"], - "comment": "Querying by a11y attributes is not standard behavior" + "comment": "TODO: Needs investigation" + }, + { + "testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne (Chromium web test) should find treeitem by name", + "platforms": ["darwin", "linux", "win32"], + "parameters": ["firefox", "webDriverBiDi"], + "expectations": ["FAIL"], + "comment": "TODO: Needs investigation" }, { "testIdPattern": "[bfcache.spec] BFCache can navigate to a BFCached page containing an OOPIF and a worker",