From 5b1211b37d5b529f5ac3f8fbbb55d5c0055b58ed Mon Sep 17 00:00:00 2001 From: azad-derakhshani-GS <98180468+azad-derakhshani-GS@users.noreply.github.com> Date: Mon, 20 Jun 2022 20:18:42 +0200 Subject: [PATCH] docs(test-advanced): fix various typos (#14932) --- docs/src/test-advanced-js.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/test-advanced-js.md b/docs/src/test-advanced-js.md index 3b7a1e42f1..52c8e56b8a 100644 --- a/docs/src/test-advanced-js.md +++ b/docs/src/test-advanced-js.md @@ -359,7 +359,7 @@ test('test', async ({ page }) => { ### Capturing trace of failures during global setup -In some instances, it may be useful to capture a trace of failures encountered during the global setup. In order to do this, you must [start tracing](./api/class-tracing.md#tracing-start) in your setup, and you must ensure that of your that you [stop tracing](./api/class-tracing.md#tracing-stop) if an error occurs before that error is thrown. This can be achieved by wrapping your setup in a `try...catch` block. Here is an example that expands the global setup example to capture a trace. +In some instances, it may be useful to capture a trace of failures encountered during the global setup. In order to do this, you must [start tracing](./api/class-tracing.md#tracing-start) in your setup, and you must ensure that you [stop tracing](./api/class-tracing.md#tracing-stop) if an error occurs before that error is thrown. This can be achieved by wrapping your setup in a `try...catch` block. Here is an example that expands the global setup example to capture a trace. ```js tab=js-js // global-setup.js @@ -368,7 +368,7 @@ const { chromium } = require('@playwright/test'); module.exports = async config => { const { baseURL, storageState } = config.projects[0].use; const browser = await chromium.launch(); - const context = await browser.newPage(); + const context = await browser.newContext(); const page = await context.newPage(); try { await context.tracing.start({ screenshots: true, snapshots: true });