-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Issues with iframes #33674
Comments
@karolwajs Thank you for the issue! It seems like there is a difference in how new and old headless handle these iframes. However, it's unlikely we can fix the issue without a repro. Anything that shows the problem, even if not consistently, would be a great help. |
If you click 'book now', the iframe will be opened (page.frameLocator('.gldbm-panel__dbmIframe')) with the booking engine, every interaction with a calendar (when it's displayed), clicking on dates for example won't be executed properly on v1.49.0 version |
@karolwajs Unfortunately, clicking "Booking now" does not open any iframe for me. But even then, guessing the actions that do not work is not something that I'd like to do. Could you please record a short script on that page that does work without |
It should work now |
What do you mean with "click won't happen"? I tried to create a smaller script which shows on the screenshot that the click happens. The screenshot it seems that the "Check in" is updated to the selected date: import { chromium } from 'playwright';
(async () => {
const browser = await chromium.launch({
channel: 'chromium',
// headless: false,
});
const context = await browser.newContext({
viewport: {
width: 1920,
height: 1080
}
});
const page = await context.newPage();
await page.goto('https://gxpservicesstagestorage.z6.web.core.windows.net');
await page.getByText('Book Now').click();
await page.frameLocator('.gldbm-panel__dbmIframe').locator('#gldbm_startdate').click();
await page.frameLocator('.gldbm-panel__dbmIframe').getByLabel(`Choose Friday, November 29, 2024 as your check-in date. It’s available.`).click();
await page.waitForTimeout(5000)
await page.screenshot({ path: 'screenshot.png' });
console.log('written screenshot');
await browser.close();
})(); |
When i switched viewport settings to: |
Version
1.49.0
Steps to reproduce
After upgrade to the newest chromium headless version my tests started to fail when i'm trying to access/make actions on some iframe elements, which isn't the case on the lower versions. I switched one of the click methods to dispatchEvent('click') and i see that this way it's working. I can't provide any specific example reproduction steps besides of mui date picker: https://mui.com/x/react-date-pickers/date-picker/, which is constantly failing in my case.
It's happening for very different locators, so i cannot provide any specific locator methods or actions, which will trigger this behaviour. I would be grateful for help, because that's the thing which is working for us on previous playwright and browser versions, it started to happen when we tried to switch to the newest one.
Channel: 'chromium'
Expected behavior
I expect iframes to work like in previous versions
Actual behavior
Error: Timed out 20000ms waiting for expect(locator).toBeVisible()
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: