当使用WebdriverIO v5.7运行多个规范/测试文件时,测试运行程序从不启动浏览器,并开始执行测试。只是挂起,直到超时。在任何日志中都没有生成错误。
尝试独立使用chromeDriver和硒。 摩卡和茉莉花框架都存在问题。 尝试将@wdio依赖项固定到较低版本。
Package.json依赖项:
"@wdio/devtools-service": "^5.7.2",
"@wdio/jasmine-framework": "^5.7.6",
"@wdio/local-runner": "^5.7.6",
"@wdio/mocha-framework": "^5.7.6",
"@wdio/reporter": "^5.7.0",
"@wdio/runner": "^5.7.6",
"@wdio/selenium-standalone-service": "^5.7.2",
"@wdio/spec-reporter": "^5.7.2",
"@wdio/sync": "^5.7.6",
"webdriverio": "^5.7.6",
配置文件:
/**
* server configurations for chromeDriver
*/
services: ['chromedriver', 'devtools'],
port: 9515,
path: '/',
chromeDriverArgs: ['--port=9515'],
chromeDriverLogs: './logs',
runner: 'local',
/**
* specify test files
*/
specs: [],
suites: {},
/**
* test configurations
* trace, debug, info, warn, error, silent
*/
logLevel: 'debug',
outputDir: './logs',
sync: true,
coloredLogs: true,
screenshotPath: './screenshots',
baseUrl: 'https://my.dev.nutrienagsolutions.com',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
framework: 'jasmine',
deprecationWarnings: true,
jasmineNodeOpts: {
defaultTimeoutInterval: 9999999,
grep: null,
invertGrep: null,
},
reporters: ['spec'],
// --inspect-brk to make selenium wait for user to open debug console in browser
debug: true,
execArgv: ['--inspect-brk=127.0.0.1:5859'],
};```
Should be able to run webdriverIO with --suite or --spec that references more than 1 test file.