我有一個量角器項目,它啓動和運行規範,但我差不多2分鐘後開始在其餘的測試用例上得到這個錯誤。我不知道爲什麼。它在一週前完美運行,但現在我面對這個錯誤,並沒有給出(或者我看不到)有關錯誤的任何細節。量角器 - 錯誤:失敗:WebDriverError
"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' ] } ]
的package.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" } }
我今天解決了這個問題。它關於package.json。如果你感興趣的話,我在我的package.json中更改這些行: **「grunt-protractor-runner」:「5.0.0」,** **「量角器」:「<5.0.0」,** –
謝謝你讓我知道。這是我的一個新信息 –