Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/474.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何更改WebdriverIO中PhantomJS的默认日志文件名和/或位置_Javascript_Phantomjs_Webdriver Io - Fatal编程技术网

Javascript 如何更改WebdriverIO中PhantomJS的默认日志文件名和/或位置

Javascript 如何更改WebdriverIO中PhantomJS的默认日志文件名和/或位置,javascript,phantomjs,webdriver-io,Javascript,Phantomjs,Webdriver Io,我的测试套件使用WebDrivero和WDIO作为运行程序来运行针对PhantomJS的测试 phantomjsdriver.log文件的默认位置是项目的根目录 wdio.conf.js中有一个选项可以将命令行参数传递给PhantomJS: 这将导致selenium-standalone.txt中出现以下内容: 请注意,第一个--webdriver logfile值是我设置的值,第二个是我试图覆盖的默认值 我怎样才能阻止第二个被包括在内 const profiles = { default:

我的测试套件使用WebDrivero和WDIO作为运行程序来运行针对PhantomJS的测试

phantomjsdriver.log文件的默认位置是项目的根目录

wdio.conf.js
中有一个选项可以将命令行参数传递给PhantomJS:

这将导致selenium-standalone.txt中出现以下内容:

请注意,第一个
--webdriver logfile
值是我设置的值,第二个是我试图覆盖的默认值

我怎样才能阻止第二个被包括在内

const profiles = {
  default: {
    services: ['selenium-standalone'],
    seleniumLogs: 'logs',
    capabilities: [
      {
        maxInstances: 1,
        browserName: 'phantomjs',
        'phantomjs.binary.path': phantomjsPath, // Set elsewhere
        'phantomjs.cli.args': [
          '--debug=true',
          '--webdriver-logfile=/project/new/path/phantomjsdriver.log'
        ]
      },
    ]
  },
  ...
}
17:03:29.589 INFO - arguments: [--debug=true, --webdriver-logfile=/project/new/path/phantomjsdriver.log, --webdriver=33837, --webdriver-logfile=/project/phantomjsdriver.log]