chrisjlee chrisjlee - 11 months ago 246
Javascript Question

protractor - launch chrome with to disable web security for cors

So our application works in production with a CORS enabled.

I have a project that isn't CORS enabled locally. Is there a way to disable web security for protractor? Is there a way for me to add arguments to the selenium instance ?

We're looking for a configuration based solution. Our local development machines are pretty locked down on what we can install. So is this possible?

What i have tried is setting chrome options:

But that appears to only be used for chrome extensions.


There is also args inside chromeOptions, provide the --disable-web-security argument:

capabilities: {
  'browserName': 'chrome',
  'chromeOptions': {
    'args': ['--disable-web-security']