Support puppeteer's Page.close
Categories
(Remote Protocol :: CDP, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 2 obsolete files)
This is used by Wordpress test suite in order to close the browser at the end of tests.
Puppeteer's Page.close
uses CDP's Target.close
:
https://github.com/GoogleChrome/puppeteer/blob/9ef23b17542cc630e502fcf6689bf6b20fa9911b/lib/Page.js#L991-L992
await this._client._connection.send('Target.closeTarget', { targetId: this._target._targetId });
await this._target._isClosedPromise;
And CDP's Target.targetDestroyed
event:
https://github.com/GoogleChrome/puppeteer/blob/3bea5d6017c36ab848a0c0b0c809e2a6b5259749/experimental/puppeteer-firefox/lib/Browser.js#L190-L193
_onTargetDestroyed({targetId}) {
const target = this._targets.get(targetId);
this._targets.delete(targetId);
target._closedCallback();
I'll ignore the {runBeforeUnload: true}
option for now and instead open a followup. Supporting this optional argument depends on CDP's Page.close
method.
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Thanks for correcting the component.
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D35106
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D35107
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f24caf8d9666
https://hg.mozilla.org/mozilla-central/rev/430bb08ecd68
https://hg.mozilla.org/mozilla-central/rev/b16a957f53f7
Reporter | ||
Comment 9•5 years ago
|
||
I believe that bug 1560127 regression is rather related to bug 1545147.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Description
•