puppeteer-extra
puppeteer-extra copied to clipboard
[Bug] iframe.contentWindow evasion breaks page with no iframe["srcdoc"]
Describe the bug Hello, you might find this bug interesting.
When iframe.contentWindow evasion is enabled, body width (among other style properties) changes to a large value.
With iframe.contentWindow evasion disabled:
<body class="pageindex jdgm--leex-script-loaded gm-menu-installed loaded">
With iframe.contentWindow evasion enabled:
<body class="pageindex jdgm--leex-script-loaded gm-menu-installed loaded" style="width: 4000px; text-size-adjust: none; zoom: 1;">
No iframe on page has srcDoc. Additionally, await page.reload() after a short delay fixes the problem.
Thank you for your work on the project.
Code Snippet
const {chromium} = require('playwright-extra');
const stealthPlugin = StealthPlugin();
chromium.use(stealthPlugin);
const browser = await chromium.launch({
channel: 'chrome',
headless:false,
viewport: null,
defaultViewport: null,
args:[ '--window-size=1366,768']
});
let page = await browser.newPage();
await page.setViewportSize({ width: 1366, height: 768, deviceScaleFactor: 1.5 });
let response = await page.goto("https://lelosi.si/",{waitUntil:"domcontentloaded", timeout:60000});
await page.waitForTimeout(8000);
Versions
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 1.91 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.15.0 - /usr/local/bin/node
npm: 8.15.0 - ~/path/to/project/node_modules/.bin/npm
npmPackages:
playwright: ^1.24.0 => 1.24.0
playwright-extra: ^4.3.3 => 4.3.3
playwright-extra-plugin-stealth: ^0.0.1 => 0.0.1
puppeteer: 15.5.0 => 15.5.0
puppeteer-cluster: ^0.23.0 => 0.23.0
puppeteer-extra: ^3.2.3 => 3.2.3
puppeteer-extra-plugin-stealth: ^2.9.0 => 2.9.0