-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current limitations blocking Playwright's WebDriver BiDi adoption #32577
Comments
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. |
@yury-s I tried to run some default tests by using the CDP protocol and I noticed that there is quite a difference in the number of tests between Chromium and Firefox. While for Chromium 11961 tests are run for Firefox these are only 3950. Could you please explain the difference? Also is it enough to only care about those 3950 tests which also get run for the |
What command did you use to run the tests? I see same number (4066) when running |
Thank you Yury! This information was helpful. It's good to know that this subset of tests will be enough to run. One thing I noticed which leads to differences in behavior especially for tests is that when I run BiDi tests the conditions for |
Yes, that's correct, we currently use different browser name to simplify implementation. AFAICT there are 139 tests that have special condition for
For some of them yes as they make no sense in Firefox, e.g. playwright/tests/library/capabilities.spec.ts Lines 149 to 165 in d029b03
playwright/tests/library/browsercontext-events.spec.ts Lines 60 to 75 in d029b03
|
Yes, that makes sense. But the question would be if the Also I can see that when running the bidi tests locally all the tests in |
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: Support ResourceType in network requests w3c/webdriver-bidi#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.Message: AbortError: Actor 'MessageHandlerFrame' destroyed before query 'MessageHandlerFrameParent:sendCommand' was resolved - apparently fails if a command is sent before about:blank navigation finishes.
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)The text was updated successfully, but these errors were encountered: