量角器更新突破端到端测试

时间:2019-03-07 19:40:44

标签: angularjs selenium protractor e2e-testing

我正在尝试在Angular应用程序上更新量角器模块。从2.4.0到当前的5.4.2,这是一个巨大的飞跃。您可能会想到,这导致应用程序上的e2e测试中断。现在,我收到此错误:

[13:29:13] E/launcher - Unable to create session from {
  "desiredCapabilities": {
    "count": 1,
    "browserName": "phantomjs",
    "phantomjs.binary.path": "\u002fusr\u002flocal\u002fbin\u002fphantomjs"
  },
  "capabilities": {
    "firstMatch": [
      {
        "browserName": "phantomjs"
      }
    ]
  }
}
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'ITSPAREMAC1.local', ip: 'fe80:0:0:0:4a7:164:5eb8:f7ed%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14', java.version: '11.0.2'
Driver info: driver.version: unknown
[13:29:13] E/launcher - SessionNotCreatedError: Unable to create session from {
  "desiredCapabilities": {
    "count": 1,
    "browserName": "phantomjs",
    "phantomjs.binary.path": "\u002fusr\u002flocal\u002fbin\u002fphantomjs"
  },
  "capabilities": {
    "firstMatch": [
      {
        "browserName": "phantomjs"
      }
    ]
  }
}
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'ITSPAREMAC1.local', ip: 'fe80:0:0:0:4a7:164:5eb8:f7ed%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14', java.version: '11.0.2'
Driver info: driver.version: unknown

我已经尝试过webdriver-manager clean -> webdriver-manager update。我还在应用程序上重新安装了其他npm软件包。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

尝试将其添加到您的配置中

  directConnect: true,

注意:如果使用seleniumAddress,请从配置中删除directConnect

要更新webdriver,请转到您的项目文件夹并运行node node_modules/protractor/bin/webdriver-manager update