问题描述
使用以下配置运行webdriverio会导致错误:
Illegal key values seen in w3c capabilities: [hostname,path,port,protocol]
配置
config = {
runner: 'local',path: '/wd/hub',specs: [
'./e2e/spec/*.js'
],exclude: [],maxInstances: 1,capabilities: [{
}],logLevel: 'error',bail: 0,baseUrl: 'http://localhost:4200',waitforTimeout: 10000,connectionRetryTimeout: 90000,connectionRetryCount: 3,services: [
['selenium-standalone',{
logPath: 'logs',installArgs: {
drivers: {
ie: {
version: "3.141.0",arch: "ia32",// forces use of 32 bit driver
baseUrl: 'http://localhost:4200'
}
}
},args: {
drivers: {
ie: {
version: "3.141.0",// forces use of 32 bit driver
baseUrl: 'http://localhost:4200'
}
}
}
}]
],framework: 'mocha',reporters: ['spec'],mochaOpts: {
ui: 'bdd',timeout: 300000
}
}
解决方法
问题是我的@wdio/selenium-standalone-service
的版本为6,而其余的webdriverio软件包的版本为5。