From 5855ff3ed6b720e23f7779f331ff01194bf11e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Wed, 4 Oct 2023 12:15:44 +0200 Subject: [PATCH] test: fix proxy rotation e2e test --- test/e2e/proxy-rotation/actor/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/e2e/proxy-rotation/actor/main.js b/test/e2e/proxy-rotation/actor/main.js index 82419420abb8..00741af34972 100644 --- a/test/e2e/proxy-rotation/actor/main.js +++ b/test/e2e/proxy-rotation/actor/main.js @@ -11,9 +11,8 @@ await Actor.main(async () => { proxyConfiguration: await Actor.createProxyConfiguration(), maxConcurrency: 1, sessionPoolOptions: { sessionOptions: { maxUsageCount: 1 } }, - async requestHandler({ page }) { - const pageContent = await page.evaluate(() => document.body.children[0].innerText); - const { clientIp } = JSON.parse(pageContent); + async requestHandler({ response }) { + const { clientIp } = await response.json(); const presentAlready = await KeyValueStore.getValue(clientIp); if (presentAlready) {