Skip to content
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] OOPIFs cannot read property 'xxx' of undefined for iframes in non-headless mode #1553

Closed
malithlk opened this issue Mar 26, 2020 · 3 comments
Assignees

Comments

@malithlk
Copy link

Context:

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:

const { chromium, devices } = require('playwright');

(async () => {
  const browser = await chromium.launch({
    headless : false
  });
 const page = await browser.newPage();
....................
....................
const myframe = page.frames().find(frame => frame.name() === 'tool_content');
await myframe.click('//span[contains(.,"Access now")]');

Describe the bug

getting below error
"TypeError: Cannot read property 'click' of undefined"

This happens when I use "headless : false" in launch options and it's working fine for "headless : true". Adding "args: ['--disable-features=site-per-process']" into launch options will do the trick.

 const browser = await chromium.launch({
    headless : false,
    args: ['--disable-features=site-per-process']
  });
@malithlk malithlk changed the title [BUG] cannot read property 'xxx' of undefined' for iframes in non-headless mode [BUG] cannot read property 'xxx' of undefined for iframes in non-headless mode Mar 26, 2020
@pavelfeldman
Copy link
Member

I believe you are dealing with the out-of-process-iframe. Those are not yet supported. Disabling site-per-process does not disable oopifs on the Google login page and similar pages.

@pavelfeldman pavelfeldman changed the title [BUG] cannot read property 'xxx' of undefined for iframes in non-headless mode [BUG] OOPIFs cannot read property 'xxx' of undefined for iframes in non-headless mode Mar 27, 2020
@dgozman dgozman self-assigned this Apr 3, 2020
@tinovyatkin
Copy link

Had the same problem with Stripe Iframe, --disable-features=site-per-process did the trick, thank @masthijohna !

@dgozman
Copy link
Contributor

dgozman commented Apr 6, 2020

Should be fixed in the next 0.13 release.

@dgozman dgozman closed this as completed Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants