0

我有一个量角器项目,它按照我的预期启动并运行规范,但在将近 2 分钟后,它开始在其余测试用例中出现此错误。我不知道为什么。一周前它运行得很好,但现在我遇到了这个错误,它没有给出(或者我看不到)任何关于错误的细节。

"Error: Failed: WebDriverError
at stack (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:2200:17)
at buildExpectationResult (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:2170:14)
at Spec.expectationResultFactory (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:777:18)
at Spec.addExpectationResult (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:450:34)
at Env.fail (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:1192:25)
at Function.next.fail (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:4046:19)
at Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasminewd2\\index.js:64:48
at ControlFlow.emit (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\selenium-webdriver\\lib\\events.js:62:21)
at ControlFlow.shutdown_ (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\selenium-webdriver\\lib\\promise.js:2565:10)
at shutdownTask_.MicroTask (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\selenium-webdriver\\lib\\promise.js:2490:53)"

有关项目的信息:它运行两个浏览器并使用 chromedriver_2.31.exe。

protractor.conf.js=>

directConnect: false, splitTestsBetweenCapabilties: true, multiCapabilities:[ { shardTestFiles: false, maxInstances: 1, maxSessions: 1, sequential: true, parallelCapability: true, browserName: 'chrome', specs: [ './tests/login/*.js', './tests/header/*.js', './tests/my-profile/*.js', './tests/nominee/*.js', './tests/left-menu/*.js', './tests/contact-us/*.js', './tests/relations/*.js', './tests/coordinator/*.js', './tests/sitemap/*.js', './tests/landing/*.js', './tests/vouchers/*.js', './tests/extend/*.js', './tests/activity/*.js' ] }, { shardTestFiles: false, maxInstances: 1, maxSessions: 1, sequential: true, parallelCapability: true, browserName: 'chrome', specs: [ './tests/enrollment/*.js', './tests/claim-/*.js', './tests/transfer/*.js', './tests/donate/*.js', './tests/buy/*.js', './tests/calculator/*.js' ] } ]

包.json => { "devDependencies": { "grunt-cli": "^1.2.0", "grunt-protractor-runner": "^4.0.0", "jasmine-spec-reporter": "^3.2.0", "protractor": "^5.0.0", "jasmine-reporters": "^2.0.0" } }

4

1 回答 1

0

如果您使用的是办公室笔记本电脑,您能否检查它是否在系统中进行了任何加密。这些加密很少会破坏节点模块,这会导致测试用例失败。

这是我能猜到的唯一原因,因为您之前运行了所有测试用例

PS:我遇到了同样的问题

于 2017-08-18T09:51:25.670 回答