-
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
[BUG] beforeunload event in headless mode is failing #4021
Comments
I've noticed that using the browserType Webkit it works well in both modes headless or not. |
aslushnikov
added a commit
to aslushnikov/playwright
that referenced
this issue
Nov 3, 2020
This patch: - co-locates beforeunload tests - adds a new test to make sure browser context can be closed if there's a page with beforeunload References microsoft#4021
aslushnikov
added a commit
to aslushnikov/playwright
that referenced
this issue
Nov 3, 2020
This patch: - co-locates beforeunload tests - adds new tests to make sure browser and browsercontext can be closed if there's a page with beforeunload listener - re-writes the `should access page after beforeunload` test to properly emit `beforeunload` event References microsoft#4021
aslushnikov
added a commit
to aslushnikov/playwright
that referenced
this issue
Nov 3, 2020
aslushnikov
added a commit
that referenced
this issue
Nov 3, 2020
This patch: - co-locates beforeunload tests - adds new tests to make sure browser and browsercontext can be closed if there's a page with beforeunload listener - re-writes the `should access page after beforeunload` test to properly emit `beforeunload` event References #4021
aslushnikov
added a commit
that referenced
this issue
Nov 3, 2020
aslushnikov
added a commit
to aslushnikov/playwright
that referenced
this issue
Nov 3, 2020
This roll includes: - fix for the firefox flakiness related to popups - fix for browser context closing with beforeunload events References microsoft#4021
aslushnikov
added a commit
that referenced
this issue
Nov 3, 2020
This roll includes: - fix for the firefox flakiness related to popups - fix for browser context closing with beforeunload events References #4021
aslushnikov
added a commit
that referenced
this issue
Nov 4, 2020
aslushnikov
added a commit
to aslushnikov/playwright
that referenced
this issue
Nov 4, 2020
aslushnikov
added a commit
that referenced
this issue
Nov 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context:
Here is the problem
I'm trying to simulate changes to be saved before closing the page, running not in a headless mode it succeeds but when headless is activated due to the need to run inside a Docker container its fails.
I've just created a React App with a button that active/deactivate the preventDefault event (https://github.com/reiinoldo/playwright-docker-test/blob/master/src/App.js).
The test clicks on the button to unsaved the changes and tries to close the page, so with that, the dialog appears and after saving the changes clicking on the button then the page can be closed.
Code Snippet
https://github.com/reiinoldo/playwright-docker-test/blob/master/e2e/playwright.config.js
https://github.com/reiinoldo/playwright-docker-test/blob/master/e2e/pageObjects/index.js
https://github.com/reiinoldo/playwright-docker-test/blob/master/e2e/specs/app.js
Output result
Comparing to successful execution, the left side is headless false, and the other is headless true which is failing:
The text was updated successfully, but these errors were encountered: