Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: scroll into view element in cross-origin iframe outside viewport (#27369)
Yury Semikhatskyac9d1ec421b5
diff --git a/tests/page/page-click-scroll.spec.ts b/tests/page/page-click-scroll.spec.tsindex 83af208c21..38bea57b72 100644--- a/tests/page/page-click-scroll.spec.ts+++ b/tests/page/page-click-scroll.spec.ts@@ -97,3 +97,15 @@ it('should scroll into view span element', async ({ page, isAndroid }) => {await page.locator('#small').scrollIntoViewIfNeeded();expect(await page.evaluate(() => window.scrollY)).toBeGreaterThan(9000);});++it('should scroll into view element in iframe', async ({ page, isAndroid, server, browserName }) => {+ it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/27196' });+ it.fixme(isAndroid);+ it.fixme(browserName === 'chromium', 'rAFs are paused in cross-origin iframes outside viewport');+ await page.goto(server.EMPTY_PAGE);+ await page.setContent(`+ <div id=big style="height: 10000px;"></div>+ <iframe src='${server.CROSS_PROCESS_PREFIX}/input/button.html'></iframe>+ `);+ await page.frameLocator('iframe').getByRole('button').click({ timeout: 5000 });+});