Open yury-s opened 2 months ago
To mention it here as well... Thanks a lot for all the details @yury-s! This is pretty helpful. As stated on the BiDi issue already I've created a Google document that contains all the above details, for collaborative editing. If you could find the time to at least roughly prioritize those features that would be great. You have a better idea what's most important, but I'll also dig into and see what could be the main issues with Firefox specifically to get more tests passing. Thanks!
@whimboo I've assigned priorities to some items in the document. Since these are the first major issues we encountered during testing, and many are blockers for further progress, most are marked as P1 or P0. For clarity, I've added definition for the priority values used. Those are priorities from Playwright's perspective. For Browser implementation issues, I highlighted those that result in massive failures (and should be prioritized higher). Beyond that I'd defer prioritization of individual feature bugs to the browser maintainers.
@yury-s some of the listed entries for Firefox are fixed in the meantime. We probably should get the list above updated (items checked) or fully rely on the Google document. It's hard to sync items on both sides - and here I don't have permissions to edit your comment for that purpose.
@whimboo thanks for bringing this up, I went ahead and marked resolved items, they should know be in sync with the Google doc.
We've spent a couple weeks adding support for Bidi to Playwright and running Playwright tests with the new protocol. The good news is there has been a large progress in Bidi support in Firefox and Chromium, many Playwright tests are now passing. However, there is still a long list of issues that are blocking Playwright from adopting Bidi as the browser automation protocol. At this point the number of bugs we identified is too large to file individual reports for each of them, instead we'll use this issue to describe some of the major problems that we've discovered.
🎉 Current stats are the following:
Spec
browsingContext.SetViewport
command can only be sent to an existing page, and there is no way to pause the load of a new page (e.g., opened via ctrl+click or a popup); these pages always load with the default viewport first.proxy
andacceptInsecureCerts
per user context rather than persession
, so that same browser process can be reused for testing with different options.isMobile
emulation to enable fixed layout mode.tests/page/page-click.spec.ts
.DOM.getFrameOwner
andDOM.describeNode
to enable converting between DOM node handles and Frame handles. This would improve the implementation ofLocator.contentFrame()
andFrameLocator.owner()
, as the current workaround usingcontentWindow
does not work with shadow DOM, as seen in thepage/frame-frame-element.spec.ts
tests.DOMContentLoaded
andload
events, which would be useful for some client requirements (e.g., 'should return when navigation is committed if commit is specified'). We need to know immediately if the navigation has failed or succeeded.request.resourceType
support (see issue: https://github.com/w3c/webdriver-bidi/issues/704).suggestedFileName
tobrowsingContext.downloadWillBegin
.accept-language
headersnavigator.language
script.addPreloadScript
per context, so that the script is always evaluated before navigation in the page. See e.g.'init script should run only once in popup'
test inpage-add-init-script.spec.ts
.These are just some of the issue that we discovered while looking at the first cut. There are many other issues that are currently blocked by the ones above.
Implementation
browsingContext.setViewport
fails intermittently with{"type":"error","id":14,"error":"unknown error","message":"AbortError: Actor 'MessageHandlerFrame' destroyed before query 'MessageHandlerFrameParent:sendCommand' was resolved","stacktrace":""}
. See this bug report.page.setContent
doesn't work because of 'Error: page.setContent: SecurityError: The operation is insecure.' in utility context. Bug reportpointerDown/pointerUp/pointerDown/pointerUp
in separateinput.performActions
commands don't generatedblclick
event, see 'should dblclick the div' in page-mouse.spec.tsscript.realmDestroyed
comes afterbrowsingContext.contextDestroyed
script.evaluate
exception have no details/messagebrowsingContext.contextDestroyed
comes before input.performActions response, see 'should not throw UnhandledPromiseRejection when page closes'. I.e. some events can come after browsingContext was destroyed.setViewport
does not affectwindow.screen.width/height
,matchMedia
, see 'should emulate device width'browsingContext.create
sometimes hangs in parallel testsbrowsingContext.downloadWillBegin
is not firedabout:blank
page is required for firefox to not close even in headless! (--silent didn't work)