fix: revert to screenshot

This commit is contained in:
karishmas6
2024-07-11 17:27:49 +05:30
parent 7e14323e1e
commit 2db73d956b

View File

@@ -180,10 +180,9 @@ export class RemoteBrowser {
*/
public makeAndEmitScreenshot = async (): Promise<void> => {
try {
const screenshot = await this.currentPage?.content();
const screenshot = await this.currentPage?.screenshot();
if (screenshot) {
const base64Html = Buffer.from(screenshot).toString('base64');
this.emitScreenshot(base64Html);
this.emitScreenshot(screenshot.toString('base64'));
}
} catch (e) {
const { message } = e as Error;