docs(test-advanced): fix various typos (#14932)
This commit is contained in:
parent
920f1d52fc
commit
5b1211b37d
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Reference in New Issue