Current limitations blocking Playwright's WebDriver BiDi adoption
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu bằng cách chọn một giới hạn chưa được đánh dấu và đọc bài kiểm thử Playwright được tham chiếu, chẳng hạn như tests/page/page-click.spec.ts, tests/page/page-frame-frame-element.spec.ts, page-add-init-script.spec.ts hoặc page-mouse.spec.ts. So sánh hành vi mong đợi với capability WebDriver BiDi tương ứng, sau đó chạy bài kiểm thử đã nêu và suite bao quanh nó. Công việc được xem là hoàn tất khi giới hạn đã chọn được triển khai và bài kiểm thử bị ảnh hưởng chạy đạt mà không gây hồi quy cho suite BiDi rộng hơn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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:
- Chromium: 2368 / 3877 passed (3.2m)
- Firefox: 1469 / 3877 passed (4.1m)
Spec
- Provide a way to configure the viewport before a popup or new tab starts loading content. Currently, the
browsingContext.SetViewportcommand 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. - Allow to configure options(aka capabilities) such as
proxyandacceptInsecureCertsper user context rather than persession, so that same browser process can be reused for testing with different options. - Add support for
isMobileemulation to enable fixed layout mode. - Allow specifying a screen size that is different from the viewport size.
- Include support for landscape mode emulation.
- Add support for getting content quads to ensure accurate clicking inside transformed elements. This is particularly relevant for tests involving transformed elements, as seen in
tests/page/page-click.spec.ts. - Implement
DOM.getFrameOwnerandDOM.describeNodeto enable converting between DOM node handles and Frame handles. This would improve the implementation ofLocator.contentFrame()andFrameLocator.owner(), as the current workaround usingcontentWindowdoes not work with shadow DOM, as seen in thepage/frame-frame-element.spec.tstests. - Introduce an event or method to track when a navigation is committed, beyond the current
DOMContentLoadedandloadevents, 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. - Provide access to the request body (see issue: https://github.com/w3c/webdriver-bidi/issues/748).
- Provide access to the response body (see issue: https://github.com/w3c/webdriver-bidi/issues/747).
- Include
request.resourceTypesupport (see issue: https://github.com/w3c/webdriver-bidi/issues/704). - Add
suggestedFileNametobrowsingContext.downloadWillBegin. - Enable retrieval of the body of a download.
- Add locale emulation (https://github.com/w3c/webdriver-bidi/issues/774), including:
accept-languageheaders- JS Date and Intl APIs
navigator.language
- Add support for timezone emulation (see issue: https://github.com/w3c/webdriver-bidi/issues/749).
- Improve user agent emulation to be per user context (see https://github.com/w3c/webdriver-bidi/issues/448#issuecomment-1944294296)
- Interception is prohibitively expensive and therefore impractical.
- Also not all requests are intercepted, e.g. WebSocket.
- Add support for setting extra HTTP headers per user context, same as user agent https://github.com/w3c/webdriver-bidi/issues/777
- Allow to call
script.addPreloadScriptper 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. - Support offline mode emulation https://github.com/w3c/webdriver-bidi/issues/776
- Support emulation of disabled JavaScript https://github.com/w3c/webdriver-bidi/issues/746
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
- Firefox:
browsingContext.setViewportfails 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. - Firefox:
page.setContentdoesn't work because of 'Error: page.setContent: SecurityError: The operation is insecure.' in utility context. Bug report - Firefox
pointerDown/pointerUp/pointerDown/pointerUpin separateinput.performActionscommands don't generatedblclickevent, see 'should dblclick the div' in page-mouse.spec.ts - Firefox:
script.realmDestroyedcomes afterbrowsingContext.contextDestroyed - Firefox:
script.evaluateexception have no details/message - Firefox:
browsingContext.contextDestroyedcomes before input.performActions response, see 'should not throw UnhandledPromiseRejection when page closes'. I.e. some events can come after browsingContext was destroyed. - Firefox: navigation id stays the same for different navigations, see 'should return from goto if new navigation is started'
- Intermittent Error: Protocol error (script.evaluate): unknown error
Message: AbortError: Actor 'MessageHandlerFrame' destroyed before query 'MessageHandlerFrameParent:sendCommand' was resolved - apparently fails if a command is sent before about:blank navigation finishes. - Firefox: lazy loading iframes are not reported (can be disabled in settings I think)
- Firefox:
setViewportdoes not affectwindow.screen.width/height,matchMedia, see 'should emulate device width' - Firefox: CSP tests are failing
- Firefox: "url" not supported yet in network.continueRequest
- Firefox: no requestfailed event when it's cancelled by the page, see 'should not throw if request was cancelled by the page' in
- Firefox: 'should amend utf8 post data' - doesn't work with non-latin post data
- Firefox: 'redirected requests should report overridden headers' - does not allow to override headers on redirects
- Firefox:
browsingContext.createsometimes hangs in parallel tests - Firefox:
browsingContext.downloadWillBeginis not fired - Firefox: "Blocked request with id 15 not found" when sending network.continueWithAuth, authentication not working
- Firefox:
about:blankpage is required for firefox to not close even in headless! (--silent didn't work) - Firefox: crash reporter dialog, can probably be fixed with settings.
- Firefox: need canonical settings for testing browser
- Chromium: Method 'network.setCacheBehavior' is not implemented.
- Ngôn ngữ chính
- TypeScript
- Star
- 100k
- Fork
- 6.9k
- Merge trung bình
- 16 giờ 8 phút
- Pull request đã merge (30 ngày)
- 281
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/playwright
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/playwright#44289 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-triage-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/playwright#44264 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] WebKit keeps every removed iframe's JS heap alive (memory grows until the page crashes)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
microsoft/playwright#44290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Regression]: requestFullscreen() in a popup rejects with "not granted" in 1.65 (Chromium 159)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
microsoft/playwright#44288 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: page.goto never returns for a load started as a newer service worker takes over (Chromium)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
microsoft/playwright#44287 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/playwright
Issue tương tự
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
openclaw/openclaw#203385 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nwverse/persona#12800 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
WISE-Community/WISE-Client#2404 ·
Maintainer thường phản hồi trong vòng 1 ngày