diff --git a/integration-test/playwright/broker-protection.spec.js b/integration-test/playwright/broker-protection.spec.js index ceb185d3ee..8732a1b66d 100644 --- a/integration-test/playwright/broker-protection.spec.js +++ b/integration-test/playwright/broker-protection.spec.js @@ -400,6 +400,17 @@ test.describe('Broker Protection communications', () => { await page.waitForURL(url => url.hash === '#2', { timeout: 2000 }) }) + test('click multiple targets', async ({ page }, workerInfo) => { + const dbp = BrokerProtectionPage.create(page, workerInfo) + await dbp.enabled() + await dbp.navigatesTo('click-multiple.html') + await dbp.receivesAction('click-multiple.json') + const response = await dbp.waitForMessage('actionCompleted') + + dbp.isSuccessMessage(response) + await page.waitForURL(url => url.hash === '#1-2', { timeout: 2000 }) + }) + test('getCaptchaInfo', async ({ page }, workerInfo) => { const dbp = BrokerProtectionPage.create(page, workerInfo) await dbp.enabled() @@ -504,7 +515,6 @@ test.describe('Broker Protection communications', () => { } } }) - await page.getByRole('heading', { name: 'Retry' }).waitFor({ timeout: 5000 }) const response = await dbp.waitForMessage('actionCompleted') diff --git a/integration-test/test-pages/broker-protection/actions/click-multiple.json b/integration-test/test-pages/broker-protection/actions/click-multiple.json new file mode 100644 index 0000000000..0564a1725a --- /dev/null +++ b/integration-test/test-pages/broker-protection/actions/click-multiple.json @@ -0,0 +1,15 @@ +{ + "state": { + "action": { + "actionType": "click", + "id": "1", + "elements": [ + { + "type": "button", + "selector": ".view-more", + "multiple": true + } + ] + } + } +} \ No newline at end of file diff --git a/integration-test/test-pages/broker-protection/pages/click-multiple.html b/integration-test/test-pages/broker-protection/pages/click-multiple.html new file mode 100644 index 0000000000..c3d6153204 --- /dev/null +++ b/integration-test/test-pages/broker-protection/pages/click-multiple.html @@ -0,0 +1,49 @@ + + +
+ + +