Files
workavia-drive/twake/integration-test/src/utils/screenshot.ts
T
2023-03-23 11:03:16 +01:00

11 lines
294 B
TypeScript

import { Page } from "puppeteer";
import config from "../config";
export const screenshot = async (context: string, page: Page) => {
const currentDate = new Date().toLocaleTimeString();
await page.screenshot({
path: `${config.screenshot_path}/${context}-${currentDate}.png`,
});
};