Yury Semikhatsky 2021-12-15 17:19:00 -08:00 committed by GitHub
parent 9b488f5a65
commit fcccac0c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -65,8 +65,12 @@ export class Tracing implements api.Tracing {
return; return;
} }
// The artifact may be missing if the browser closed while stopping tracing.
if (!result.artifact)
return;
// Save trace to the final local file. // Save trace to the final local file.
const artifact = Artifact.from(result.artifact!); const artifact = Artifact.from(result.artifact);
await artifact.saveAs(filePath); await artifact.saveAs(filePath);
await artifact.delete(); await artifact.delete();

View File

@ -840,6 +840,7 @@ BrowserContext:
- compressTrace - compressTrace
- compressTraceAndSources - compressTraceAndSources
returns: returns:
# The artifact may be missing if the browser closes while tracing is beeing stopped.
artifact: Artifact? artifact: Artifact?
sourceEntries: sourceEntries:
type: array? type: array?