mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-24 06:49:04 +03:00
This PR cherry-picks the following commits:
- da6707f785
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
268942037a
commit
8aef8e8fc2
@ -46,6 +46,7 @@ import type { Protocol } from './protocol';
|
||||
import { VideoRecorder } from './videoRecorder';
|
||||
import { BrowserContext } from '../browserContext';
|
||||
import { TargetClosedError } from '../errors';
|
||||
import { isSessionClosedError } from '../protocolError';
|
||||
|
||||
|
||||
const UTILITY_WORLD_NAME = '__playwright_utility_world__';
|
||||
@ -132,7 +133,7 @@ export class CRPage implements PageDelegate {
|
||||
return cb(frameSession);
|
||||
return cb(frameSession).catch(e => {
|
||||
// Broadcasting a message to the closed iframe should be a noop.
|
||||
if (e.message && e.message.includes('Target closed'))
|
||||
if (isSessionClosedError(e))
|
||||
return;
|
||||
throw e;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user