Skip to content

[BUG] OOPIFs cannot read property 'xxx' of undefined for iframes in non-headless mode #1553

@malithlk

Description

@malithlk

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']
  });

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions