Tools: No way to override default configuration in the plugin

Created on 23 Feb 2017  路  6Comments  路  Source: Polymer/tools

wct only provides a way to set the browserOptions object as a set of defaults, which are overridden by wct-local. There is thus no way to override what wtc-local does by default for any of the browsers (the functions in LAUNCHPAD_TO_SELENIUM).

For example, with Selenium 3.0, inside Docker, my google-chrome will crash unless I run it with --no-sandbox. This means in order to work with wct, I'd need to be able to override chromeOptions.args. Currently, wct-local gives me no way to do so.

I propose a configuration option (browserOverrides) that would look something like this in wct.conf.json

{
  "suites": ["build/unbundled/test"],
  "plugins": {
    "local": {
      "browsers": ["chrome"],
      "browserOverrides": {
        "chrome": {
          "version": "53",
          "chromeOptions": {
            "binary": "/custom/chrome/path",
            "args": ["no-sandbox"]
          }
        }
      }
    }
  }
}

It would then get applied to the configurations created in browsers.ts, _after_ the launchpad conversion had been made.

Should be relatively easy to implement鈥擨 can submit a PR if you'd like.

wct-local wontfix

Most helpful comment

The lack of being able to set chromeOptions also makes it impossible to use the new headless mode.

All 6 comments

The lack of being able to set chromeOptions also makes it impossible to use the new headless mode.

Any progress on this? I hate to modify wct-local myself.

@myw If you could submit a PR that'd be great. This would be a big win for using chrome for testing components in headless environments.

This is a blocker for headless.

Upon further research, I found the problem is not in this package. Please refer to https://github.com/Polymer/web-component-tester/issues/561

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

priyabrat1801 picture priyabrat1801  路  3Comments

rictic picture rictic  路  3Comments

justinfagnani picture justinfagnani  路  4Comments

dilansankalpa picture dilansankalpa  路  3Comments

lpellegr picture lpellegr  路  4Comments