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

How can I enable disable web security flag in playwright.config.ts #15757

Closed
rohithbb433 opened this issue Jul 18, 2022 · 3 comments
Closed

How can I enable disable web security flag in playwright.config.ts #15757

rohithbb433 opened this issue Jul 18, 2022 · 3 comments

Comments

@rohithbb433
Copy link

I need help in setting --disable-web-security flag in playwright.config.ts. Can someone pls help me on this.

@dgozman
Copy link
Contributor

dgozman commented Jul 18, 2022

@rohithbb433 Pass launchOptions like this:

// playwright.config.ts
import { type PlaywrightTestConfig, devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
  projects: [
    {
      name: 'chromium',
      use: {
        ...devices['Desktop Chrome'],
        launchOptions: {
          // Put your chromium-specific args here
          args: ['--disable-web-security'],
        },
      },
    },
  ],
};
export default config;

Let me know if that doesn't work for you.

@dgozman dgozman closed this as completed Jul 18, 2022
@rohithbb433
Copy link
Author

Thank you @dgozman

@Faizan-Mamji
Copy link

Thank you @dgozman :)

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

3 participants