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

Add browser.closed and page.closed events #952

Closed
aslushnikov opened this issue Oct 4, 2017 · 5 comments · Fixed by #960
Closed

Add browser.closed and page.closed events #952

aslushnikov opened this issue Oct 4, 2017 · 5 comments · Fixed by #960
Labels

Comments

@aslushnikov
Copy link
Contributor

  • Fire browser.closed event when the underlying browser process gets closed / crashes
  • Fire page.closed event when the page gets closed / crashes

This will help to build reliable scripts that restart browser or reopen pages when they crash.

@sukrosono
Copy link
Contributor

currently no PR to this right? Is it ok if i just take page.closed ?

@sukrosono
Copy link
Contributor

sukrosono commented Oct 14, 2017

Hi @aslushnikov , please correct me if i am wrong. With

Fire browser.closed event when the underlying browser process gets closed / crashes

My attempt was to close the browser when the page got crashed. But the result was 370 specs, 309 failures, This is what my attempt looks like. Here the travis build failure, and the raw log (too many error so the summary only available on raw log). Gladly awaiting your response 😄 .

update
Sorry to brother you i just found Browser.close via #1027. I will try use that, even i don't know the impact yet. When you have free time, please give me some direction, a couple of word help me alot.

aslushnikov pushed a commit that referenced this issue Nov 4, 2017
This patch adds a 'disconnected' event for the browser. The event is issued
when the "browser" loses connection to the chrome process.

References #952
@aslushnikov
Copy link
Contributor Author

For this to be closed, the 'page.disconnected' is also necessary.

@aslushnikov aslushnikov reopened this Nov 4, 2017
aslushnikov pushed a commit that referenced this issue Mar 28, 2018
This patch adds 'page.close' event.

References #952.
@aslushnikov
Copy link
Contributor Author

We now have browser.disconnected and page.close events.

@natsu90
Copy link

natsu90 commented Aug 27, 2023

is there anyway i can know either the browser is crashed or closed from the disconnected event? i only want to relaunch the browser when it crashes, not when i called browser.close()

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 a pull request may close this issue.

3 participants