feat: init
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
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`,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user