From 715e3d4a92abcc5f7edf2456fe8cd5dc4c65cb84 Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 22 Mar 2023 11:26:52 +0200 Subject: [PATCH] Scroll to paypal frame in playwright Looks like it may not happen automatically --- tests/playwright/place-order.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/playwright/place-order.spec.js b/tests/playwright/place-order.spec.js index 6de587971..1cae8a8a5 100644 --- a/tests/playwright/place-order.spec.js +++ b/tests/playwright/place-order.spec.js @@ -24,6 +24,8 @@ test('PayPal button place order from Product page', async ({page}) => { await page.goto(PRODUCT_URL); + await page.locator('.component-frame').scrollIntoViewIfNeeded(); + const [popup] = await Promise.all([ page.waitForEvent('popup'), page.frameLocator('.component-frame').locator('[data-funding-source="paypal"]').click(),