Javascript 量角器只运行铬

Javascript 量角器只运行铬,javascript,angularjs,firefox,protractor,Javascript,Angularjs,Firefox,Protractor,我想用Firefox和phantomJS而不是chrome来运行量角器测试。但是,只有当我指定'chromeOnly:true'选项并指定Chrome作为浏览器时,它才会运行 否则它将崩溃并抛出错误“无法启动Webdriver会话” 我的量角器配置: 'use strict'; var paths = require('./.yo-rc.json')['generator-gulp-angular'].props.paths; // An example configuration file

我想用Firefox和phantomJS而不是chrome来运行量角器测试。但是,只有当我指定'chromeOnly:true'选项并指定Chrome作为浏览器时,它才会运行

否则它将崩溃并抛出错误“无法启动Webdriver会话”

我的量角器配置:

'use strict';

var paths = require('./.yo-rc.json')['generator-gulp-angular'].props.paths;

// An example configuration file.
exports.config = {
  // The address of a running selenium server.
  seleniumAddress: 'http://localhost:4444/wd/hub',
  //seleniumServerJar: deprecated, this should be set on node_modules/protractor/config.json

  // Capabilities to be passed to the webdriver instance.
  capabilities: {
     'browserName': 'firefox'
  },
  //chromeOnly: true,

  baseUrl: 'http://localhost:8000/',

  framework: 'jasmine',

  // Spec patterns are relative to the current working directly when
  // protractor is called.
  specs: [paths.e2e + '/**/*.js'],

  // Options to be passed to Jasmine-node.
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000
  }
};

请注意,不考虑使用带量角器的phantomjs。 取自

将phantomjs添加到驱动程序功能,如果使用本地安装,则包括二进制文件的路径:


请注意,不考虑使用带量角器的phantomjs。 取自

将phantomjs添加到驱动程序功能,如果使用本地安装,则包括二进制文件的路径:


请注意,不考虑使用带量角器的phantomjs。 取自

将phantomjs添加到驱动程序功能,如果使用本地安装,则包括二进制文件的路径:


请注意,不考虑使用带量角器的phantomjs。 取自

将phantomjs添加到驱动程序功能,如果使用本地安装,则包括二进制文件的路径:

使用

使用

使用

使用

“chromeOnly”选项意味着“直接连接到chrome”(与使用selenium服务器相比)。当您删除该选项时,量角器希望与selenium服务器通信以控制浏览器。看

由于Firefox现在也支持“直接连接”模式,“chromeOnly”配置选项已重命名为“directConnect”。看

要直接使用Firefox,您可以保留错误命名的“chromeOnly”选项集,或者切换到“directConnect”。或者,您可以通过selenium服务器使用Firefox(这只意味着您需要启动selenium服务器,请参阅上面列出的server-setup.md文档)。

chromeOnly选项意味着“直接连接到chrome”(与使用selenium服务器相比)。当您删除该选项时,量角器希望与selenium服务器通信以控制浏览器。看

由于Firefox现在也支持“直接连接”模式,“chromeOnly”配置选项已重命名为“directConnect”。看

要直接使用Firefox,您可以保留错误命名的“chromeOnly”选项集,或者切换到“directConnect”。或者,您可以通过selenium服务器使用Firefox(这只意味着您需要启动selenium服务器,请参阅上面列出的server-setup.md文档)。

chromeOnly选项意味着“直接连接到chrome”(与使用selenium服务器相比)。当您删除该选项时,量角器希望与selenium服务器通信以控制浏览器。看

由于Firefox现在也支持“直接连接”模式,“chromeOnly”配置选项已重命名为“directConnect”。看

要直接使用Firefox,您可以保留错误命名的“chromeOnly”选项集,或者切换到“directConnect”。或者,您可以通过selenium服务器使用Firefox(这只意味着您需要启动selenium服务器,请参阅上面列出的server-setup.md文档)。

chromeOnly选项意味着“直接连接到chrome”(与使用selenium服务器相比)。当您删除该选项时,量角器希望与selenium服务器通信以控制浏览器。看

由于Firefox现在也支持“直接连接”模式,“chromeOnly”配置选项已重命名为“directConnect”。看


要直接使用Firefox,您可以保留错误命名的“chromeOnly”选项集,或者切换到“directConnect”。或者,您可以通过selenium服务器使用Firefox(这意味着您需要启动selenium服务器,请参阅上面列出的server-setup.md文档)。

您使用的量角器和Firefox版本是什么?谢谢。您使用的是什么量角器和firefox版本?谢谢。您使用的是什么量角器和firefox版本?谢谢。您使用的是什么量角器和firefox版本?谢谢。这些都是好的观点,但我不确定这是关于设置的。“无法启动Webdriver会话”错误使我认为这是selenium js绑定和firefox之间的兼容性问题。这些都是好的方面,但我不确定这是否与设置有关。“无法启动Webdriver会话”错误使我认为这是selenium js绑定和firefox之间的兼容性问题。这些都是好的方面,但我不确定这是否与设置有关。“无法启动Webdriver会话”错误使我认为这是selenium js绑定和firefox之间的兼容性问题。这些都是好的方面,但我不确定这是否与设置有关。“无法启动Webdriver会话”错误使我认为这是selenium js绑定和firefox之间的兼容性问题。。
capabilities: {
  'browserName': 'phantomjs',

  /* 
   * Can be used to specify the phantomjs binary path.
   * This can generally be ommitted if you installed phantomjs globally.
   */
  'phantomjs.binary.path': require('phantomjs').path,

  /*
   * Command line args to pass to ghostdriver, phantomjs's browser driver.
   * See https://github.com/detro/ghostdriver#faq
   */
  'phantomjs.ghostdriver.cli.args': ['--loglevel=DEBUG']
}
multiCapabilities : [
            {
            'browserName' : 'chrome',
            'chromeOptions' : {
                'binary' : 'chrome.exe',
                'args' : [],
                'extensions' : []
            },
            {
                'browserName' : 'firefox',
                'chromeOptions' : {
                    'binary' : 'path to firefox.exe',
                    'args' : [],
                    'extensions' : []
            }...
        }