question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`--disable-web-security` seems does not work

See original GitHub issue

I have a context

const browser = await playwright['chromium'].launch({
    args: [
    '--disable-web-security', //Don't enforce the same-origin policy. (Used by people testing their sites - https://peter.sh/experiments/chromium-command-line-switches)
    ],
    headless: false
  });
  const page = await browser.newPage()
  await page.goto('https://host.com/frames.html')

iframes.html

<html>
    <head>
        <title>Frames</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <frameset cols="50%, 50%">
        <frame src="https://anotherhost.com"/>
    </frameset>
</html>

=> the https://anotherhost.com does not load in the frame, do you have any idea?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
jake-b-storycommented, Jul 26, 2022

@yusoof-pret and @rohithbb433

To set this within the playwright.config.ts file, I believe it will look like:

const config: PlaywrightTestConfig = {
  projects: [
    {
      name: 'chromium',
      use: {
        launchOptions: {
          args: ['--disable-web-security'],
        }
      },
    }
  ]
}
0reactions
rohithbb433commented, Jul 18, 2022

How to set this in the playwright.config.ts to disable the web security when browser launch

Even I have this doubt. Can someone suggest how we can disable it in playwright.config.ts file

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does --disable-web-security Work In Chrome Anymore?
With the current Chrome it doesn't matter. I am browsing with enabled security while e2e testing with disabled security in a different window...
Read more >
575690 - `--disable-web-security` works with an empty value ...
Perform an AJAX request to another domain which doesn't support CORS. 3. Chrome blocks the request. What is the expected behavior? Chrome should ......
Read more >
v81 breaks dev using --disable-web-security - Google Help
Latest Canary releases appear to have dropped support for the command line param "--disable-web-security" , in fact, it stopped working a ...
Read more >
disable-web-security to Firefox developer options to globally ...
For bugs in Firefox DevTools, the developer tools within the Firefox web browser. This includes issues about the user interface of the toolbox,...
Read more >
disable the warning 'You are using an unsupported command ...
chrome --kiosk --disable-web-security abc.htm ... The security is not a concern as my system as it is only being connected to a private...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found