Skip to content

Commit

Permalink
add recipe for browser name [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Nov 16, 2022
1 parent 0403710 commit 0fabe1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0fabe1c

Please sign in to comment.