Open davethepunkyone opened 1 day ago
I can repro in JS as well. Works as expected in v1.45.1, does not work in v1.46.0.
import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('https://www.nhs.uk');
await page.pause();
});
Version
1.48.0 (also present in 1.47.0)
Steps to reproduce
Create a test that uses mobile browser emulation (basic example below uses pytest):
pytest --headed --slowmo 2000
Expected behavior
When the test is executing, the site under test renders in mobile mode and displays as it normally would on a mobile device.
Screenshot running Playwright v1.45.1:
Actual behavior
When the test is executing, the site under test appears to render in desktop mode and content is not visible in trace files or if screenshots are taken.
Screenshot running Playwright v1.48.0:
Additional context
This issue isn't present in v1.45.1 of Playwright, so has seemingly been introduced after this point.
I've tested using multiple devices including Apple (iPhone 12, 13) and Android (Pixel 7) and the output seems to be the same. I've checked the debugging and looked at the devices object and it appears that isMobile is set to True when using these devices by default too.
Environment