mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00

Similarly to page.close, we pass test-runner specific reason to facilitate better error messages. ``` 1) a.test.ts:10:11 › test Error: apiRequestContext.fetch: Fixture { request } from beforeAll cannot be reused in a test. - Recommended fix: use a separate { request } in the test. - Alternatively, manually create APIRequestContext in beforeAll and dispose it in afterAll. See https://playwright.dev/docs/api-testing#sending-api-requests-from-ui-tests for more details. 9 | 10 | test('test', async () => { > 11 | await context.fetch('http://example.com'); | ^ 12 | }); 13 | ``` Closes #29260.