From 0fabe1c7830db22d66973c6a46958347054c19eb Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 16 Nov 2022 22:30:24 +0100 Subject: [PATCH] add recipe for browser name [skip ci] --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ef5d7753..e424f448 100644 --- a/README.md +++ b/README.md @@ -452,6 +452,8 @@ module.exports = { expect.extend({ toMatchImageSnapshot }); }, async postRender(page, context) { + // If you want to take screenshot of multiple browsers, use + // page.context().browser().browserType().name() to get the browser name to prefix the file name const image = await page.screenshot(); expect(image).toMatchImageSnapshot({ customSnapshotsDir,