【问题标题】:Running chrome in --no-sandbox mode using chimp.js使用 chimp.js 在 --no-sandbox 模式下运行 chrome
【发布时间】:2016-08-18 19:21:00
【问题描述】:

在使用 chimp + mocha + selenium 时,有没有办法告诉 chimp 在沙箱外运行 chrome?

我在他们的网站上读到,大部分配置都可以通过命令行完成,但我无法在文档中找到可能的参数列表。

【问题讨论】:

    标签: javascript node.js testing mocha.js chimp.js


    【解决方案1】:

    以下是选项列表:

    根据他们在https://chimp.readme.io/docs/command-line-options 上的文档

    有关可用选项,请参阅default Chimp configuration file。您可以通过命令行提供该文件中的任何选项,也可以通过在列出的选项前面加上 --.

    截至 2017 年 1 月 1 日的完整选项列表

    检查上面的默认配置文件以保持最新 以下是选项列表及其默认值:

    // - - - - CHIMP - - - -
     watch: false,
     watchTags: '@watch,@focus',
     domainSteps: null,
     e2eSteps: null,
     fullDomain: false,
     domainOnly: false,
     e2eTags: '@e2e',
     watchWithPolling: false,
     server: false,
     serverPort: 8060,
     serverHost: 'localhost',
     sync: true,
     offline: false,
     showXolvioMessages: true,
    
     // - - - - CUCUMBER - - - -
     path: './features',
     format: 'pretty',
     tags: '~@ignore',
     singleSnippetPerFile: true,
     recommendedFilenameSeparator: '_',
     chai: false,
     screenshotsOnError: isCI(),
     screenshotsPath: '.screenshots',
     captureAllStepScreenshots: false,
     saveScreenshotsToDisk: true,
     // Note: With a large viewport size and captureAllStepScreenshots enabled,
     // you may run out of memory. Use browser.setViewportSize to make the
     // viewport size smaller.
     saveScreenshotsToReport: false,
     jsonOutput: null,
     compiler: 'js:' + path.resolve(__dirname, '../lib/babel-register.js'),
     conditionOutput: true,
    
     // - - - - SELENIUM  - - - -
     browser: null,
     platform: 'ANY',
     name: '',
     user: '',
     key: '',
     port: null,
     host: null,
     // deviceName: null,
    
     // - - - - WEBDRIVER-IO  - - - -
     webdriverio: {
       desiredCapabilities: {},
       logLevel: 'silent',
       // logOutput: null,
       host: '127.0.0.1',
       port: 4444,
       path: '/wd/hub',
       baseUrl: null,
       coloredLogs: true,
       screenshotPath: null,
       waitforTimeout: 500,
       waitforInterval: 250,
     },
    
     // - - - - SELENIUM-STANDALONE
     seleniumStandaloneOptions: {
       // check for more recent versions of selenium here:
       // http://selenium-release.storage.googleapis.com/index.html
       version: '2.53.1',
       baseURL: 'https://selenium-release.storage.googleapis.com',
       drivers: {
         chrome: {
           // check for more recent versions of chrome driver here:
           // http://chromedriver.storage.googleapis.com/index.html
           version: '2.25',
           arch: process.arch,
           baseURL: 'https://chromedriver.storage.googleapis.com'
         },
         ie: {
           // check for more recent versions of internet explorer driver here:
           // http://selenium-release.storage.googleapis.com/index.html
           version: '2.50.0',
           arch: 'ia32',
           baseURL: 'https://selenium-release.storage.googleapis.com'
         },
         firefox: {
           // check for more recent versions of gecko  driver here:
           // https://github.com/mozilla/geckodriver/releases
           version: '0.11.1',
           arch: process.arch,
           baseURL: 'https://github.com/mozilla/geckodriver/releases/download'
         }
       }
     },
    
     // - - - - SESSION-MANAGER  - - - -
     noSessionReuse: false,
    
     // - - - - SIMIAN  - - - -
     simianResultEndPoint: 'api.simian.io/v1.0/result',
     simianAccessToken: false,
     simianResultBranch: null,
     simianRepositoryId: null,
    
     // - - - - MOCHA  - - - -
     mocha: false,
     mochaCommandLineOptions: ['--color'],
     mochaConfig: {
       // tags and grep only work when watch mode is false
       tags: '',
       grep: null,
       timeout: 60000,
       reporter: 'spec',
       slow: 10000,
     },
    
     // - - - - JASMINE  - - - -
     jasmine: false,
     jasmineConfig: {
       specDir: '.',
       specFiles: [
         '**/*@(_spec|-spec|Spec).@(js|jsx)',
       ],
       helpers: [
         'support/**/*.@(js|jsx)',
       ],
       stopSpecOnExpectationFailure: false,
       random: false,
     },
     jasmineReporterConfig: {
       // This options are passed to jasmine.configureDefaultReporter(...)
       // See: http://jasmine.github.io/2.4/node.html#section-Reporters
     },
    
     // - - - - METEOR  - - - -
     ddp: false,
     serverExecuteTimeout: 10000,
    
     // - - - - PHANTOM  - - - -
     phantom_w: 1280,
     phantom_h: 1024,
     phantom_ignoreSSLErrors: false,
    
     // - - - - DEBUGGING  - - - -
     log: 'info',
     debug: false,
     seleniumDebug: null,
     debugCucumber: null,
     debugBrkCucumber: null,
     debugMocha: null,
     debugBrkMocha: null,
    

    【讨论】:

      猜你喜欢
      • 2018-08-12
      • 2023-03-17
      • 2023-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-04
      • 2019-05-09
      • 2021-09-08
      相关资源
      最近更新 更多