mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: scroll into view span element (#20628)
https://github.com/microsoft/playwright/issues/20165
This commit is contained in:
parent
758246bb9e
commit
492e9f6d7c
@ -86,3 +86,15 @@ it('should not crash when force-clicking hidden input', async ({ page, browserNa
|
||||
const error = await page.locator('input').click({ force: true, timeout: 2000 }).catch(e => e);
|
||||
expect(error.message).toContain('Element is not visible');
|
||||
});
|
||||
|
||||
it('should scroll into view span element', async ({ page, browserName }) => {
|
||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/20165' });
|
||||
it.fixme(browserName === 'webkit');
|
||||
await page.setContent(`
|
||||
<div id=big style="height: 10000px;"></div>
|
||||
<span id=small>foo</span>
|
||||
`);
|
||||
await page.locator('#small').scrollIntoViewIfNeeded();
|
||||
console.log(await page.evaluate(() => window.scrollY));
|
||||
expect(await page.evaluate(() => window.scrollY)).toBeGreaterThan(9000);
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user