-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Context:
- Playwright Version: 1.2.1
- Operating System: ubuntu 20.04
- Node version: 10.19
- Browser: Chromium
Code Snippet
<!-- running at localhost:8000 -->
<body>
<div style="position:fixed;top:300px;left:300px;width:400px;height:400px;">
<iframe src="https://en.wikipedia.org/" width="100%" height="100%" > </iframe>
</div>
</body>const playwright = require('playwright');
(async () => {
const browser = await playwright.chromium.launch({headless:false });
const context = await browser.newContext({viewport:{width:1920, height:1080}});
const page = await context.newPage();
await page.goto('http://localhost:8000');
const frame = page.frames()[1]
const button = await frame.$('#pt-login')
await button.click()
await browser.close();
})();The bug
Chromium does not succeed in clicking the login button.
The position of elements inside a cross-origin iframe seem to be calculated without taking the offset of the iframe into account.
The offset of the iframe is set to top-left 300,300. Playwright tries to click 275.74, 37.18
checking that element receives pointer events at (275.74,37.18)
Serving some other content from localhost inside the iframe in chromium does take the offset into account and works as expected.
(Firefox works fine. Have not tried webkit)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels