From 9f81592075a308cb01b316aa5b87fa1d23c45cbb Mon Sep 17 00:00:00 2001 From: nickevansuk <2616208+nickevansuk@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:22:54 +0100 Subject: [PATCH] fix: Screenshots for auth --- .../lib/browser-automation-for-auth.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/openactive-openid-test-client/lib/browser-automation-for-auth.js b/packages/openactive-openid-test-client/lib/browser-automation-for-auth.js index 70487db0f8..fbf4162958 100644 --- a/packages/openactive-openid-test-client/lib/browser-automation-for-auth.js +++ b/packages/openactive-openid-test-client/lib/browser-automation-for-auth.js @@ -30,9 +30,10 @@ const AUTHORIZE_SUCCESS_CLASS = 'openactive-test-callback-success'; * @param {Context} context */ async function addScreenshot(page, title, context) { - const image = await page.screenshot({ + const imageBuffer = await page.screenshot({ encoding: 'base64', }); + const image = imageBuffer.toString(); const url = page.url(); context.screenshots.push({ title,