Skip to content
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

feat: page.handleLocator that closes any interstitial pages/dialogs #29029

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Jan 17, 2024

No description provided.

This comment has been minimized.

@dgozman dgozman added the CQ1 label Jan 18, 2024
Copy link
Contributor

Test results for "tests 2"

4 fatal errors, not part of any test
1 failed
❌ [firefox] › library/emulation-focus.spec.ts:65:3 › should not affect mouse event target page

70 flaky ⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/inspector/cli-codegen-1.spec.ts:22:7 › cli codegen › should click
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/inspector/cli-codegen-1.spec.ts:450:7 › cli codegen › should check
⚠️ [chromium] › page/page-drag.spec.ts:272:5 › Drag and drop › should work if a frame is stalled
⚠️ [chromium] › page/page-mouse.spec.ts:166:3 › should trigger hover state
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › page/page-mouse.spec.ts:221:3 › should tween mouse movement
⚠️ [chromium] › library/emulation-focus.spec.ts:190:12 › should trigger hover state concurrently
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/inspector/cli-codegen-1.spec.ts:22:7 › cli codegen › should click
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/chromium/oopif.spec.ts:260:3 › ElementHandle.boundingBox() should work
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › page/page-request-continue.spec.ts:290:3 › should work with Cross-Origin-Opener-Policy
⚠️ [firefox] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › library/trace-viewer.spec.ts:825:1 › should include requestUrl in route.continue
⚠️ [firefox] › library/capabilities.spec.ts:257:3 › requestFullscreen
⚠️ [firefox] › library/video.spec.ts:351:5 › screencast › should capture navigation
⚠️ [firefox] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › library/video.spec.ts:165:5 › screencast › should work with old options
⚠️ [firefox] › library/fetch-proxy.spec.ts:30:3 › context request should pick up proxy credentials
⚠️ [firefox] › library/video.spec.ts:165:5 › screencast › should work with old options
⚠️ [firefox] › page/frame-goto.spec.ts:46:3 › should continue after client redirect
⚠️ [firefox] › page/locator-misc-1.spec.ts:21:3 › should hover @smoke
⚠️ [firefox] › page/page-drag.spec.ts:289:5 › Drag and drop › should work with the helper method
⚠️ [firefox] › page/page-set-input-files.spec.ts:287:3 › should work when file input is not attached to DOM
⚠️ [firefox] › library/browsercontext-add-cookies.spec.ts:141:3 › should isolate persistent cookies
⚠️ [firefox] › library/browsercontext-har.spec.ts:342:3 › should update har.zip for context
⚠️ [firefox] › library/hit-target.spec.ts:298:3 › should click an element inside closed shadow root
⚠️ [firefox] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › library/emulation-focus.spec.ts:65:3 › should not affect mouse event target page
⚠️ [firefox] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/trace-viewer.spec.ts:946:1 › should prefer later resource request with the same method
⚠️ [chromium] › library/browsercontext-credentials.spec.ts:55:1 › should work with correct credentials @smoke
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/browsercontext-credentials.spec.ts:55:1 › should work with correct credentials @smoke
⚠️ [chromium] › library/proxy.spec.ts:93:11 › should proxy local network requests › by default › loopback address
⚠️ [chromium] › library/proxy.spec.ts:93:11 › should proxy local network requests › with other bypasses › link-local
⚠️ [chromium] › page/page-drag.spec.ts:330:5 › Drag and drop › should work with locators
⚠️ [chromium] › library/inspector/cli-codegen-1.spec.ts:22:7 › cli codegen › should click
⚠️ [chromium] › library/inspector/cli-codegen-2.spec.ts:24:7 › cli codegen › should contain open page
⚠️ [chromium] › library/selector-generator.spec.ts:31:5 › selector generator › should prefer button over inner span
⚠️ [chromium] › library/browsertype-connect.spec.ts:237:5 › run-server › should send default User-Agent and X-Playwright-Browser headers with connect request
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [firefox] › library/emulation-focus.spec.ts:65:3 › should not affect mouse event target page
⚠️ [webkit] › library/browsercontext-reuse.spec.ts:50:1 › should reset serviceworker
⚠️ [webkit] › library/inspector/cli-codegen-3.spec.ts:531:7 › cli codegen › should consume pointer events
⚠️ [webkit] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [webkit] › page/page-drag.spec.ts:246:5 › Drag and drop › should work if the drag event is captured but not canceled
⚠️ [webkit] › page/page-drag.spec.ts:289:5 › Drag and drop › should work with the helper method
⚠️ [webkit] › library/emulation-focus.spec.ts:190:12 › should trigger hover state concurrently
⚠️ [webkit] › library/inspector/cli-codegen-1.spec.ts:552:7 › cli codegen › should select
⚠️ [webkit] › library/inspector/cli-codegen-3.spec.ts:383:7 › cli codegen › should generate getByTestId
⚠️ [webkit] › library/inspector/cli-codegen-3.spec.ts:415:7 › cli codegen › should generate getByPlaceholder
⚠️ [webkit] › page/page-drag.spec.ts:246:5 › Drag and drop › should work if the drag event is captured but not canceled
⚠️ [webkit] › page/page-drag.spec.ts:330:5 › Drag and drop › should work with locators
⚠️ [webkit] › page/page-mouse.spec.ts:186:3 › should trigger hover state on disabled button
⚠️ [webkit] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks

174397 passed, 7816 skipped, 24 did not run
✔️✔️✔️

Merge workflow run.

docs/src/api/class-page.md Outdated Show resolved Hide resolved
docs/src/api/class-page.md Outdated Show resolved Hide resolved
@@ -3130,6 +3130,202 @@ return value resolves to `[]`.
### param: Page.querySelectorAll.selector = %%-query-selector-%%
* since: v1.9


## async method: Page.handleLocator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite like handleLocator, in particular because we already have JS/ElementHandle and Locator in the API. Perhaps something like interceptLocator ? or probably invert it to Locator.intercept()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good feedback, let's leave it for the API review!

packages/playwright-core/src/server/frames.ts Show resolved Hide resolved

This comment has been minimized.

Copy link
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:243:5 › should not include trace resources from the previous chunks

21337 passed, 579 skipped
✔️✔️✔️

Merge workflow run.

@dgozman dgozman merged commit f3fac6f into microsoft:main Jan 19, 2024
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants