# Test info

- Name: Feature case for request-listing >> REQ_021 - Verify Snapshot in request had action type Letter of Protection
- Location: /root/code/portal-automation-test/tests/request/function.spec.ts:632:9

# Error details

```
Error: locator.screenshot: Target page, context or browser has been closed

Call Log:
- Test timeout of 200000ms exceeded
    at verifyScreenshot (/root/code/portal-automation-test/utils/screenshot.ts:8:8)
    at /root/code/portal-automation-test/tests/request/function.spec.ts:649:35
    at /root/code/portal-automation-test/tests/request/function.spec.ts:641:9
```

# Test source

```ts
   1 | import { expect, Locator, Page } from "@playwright/test";
   2 |
   3 | export const verifyScreenshot = async (snapshotName: string, target: Page | Locator, mask?: Locator[]) => {
   4 |     expect(async () => {
   5 |         expect(await target.screenshot({
   6 |             mask
   7 |         })).toMatchSnapshot(snapshotName)
>  8 |     }).toPass();
     |        ^ Error: locator.screenshot: Target page, context or browser has been closed
   9 | }
  10 |
  11 | export const takeScreenshot = async (snapshotName: string, target: Page | Locator, mask?: Locator[]) => {
  12 |     expect(await target.screenshot({
  13 |         mask
  14 |     })).toMatchSnapshot(snapshotName)
  15 | }
```