当我运行我的规范时,它启动Chrome并立即打开另一个标签到Chrome设置页面。完全不知道发生了什么。以下是错误消息:
[11:38:54] I/direct - Using ChromeDriver directly...
[11:38:54] I/launcher - Running 1 instances of WebDriver
[11:39:54] E/launcher - unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.26.436421 (6c1a3ab469ad86fd49c8d97ede4a6b96a49ca5f6),platform=Mac OS X 10.12.6 x86_64)
[11:39:54] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.26.436421 (6c1a3ab469ad86fd49c8d97ede4a6b96a49ca5f6),platform=Mac OS X 10.12.6 x86_64)
at WebDriverError
(/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:10)
at Object.checkLegacyResponse (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:639:15)
at parseHttpResponse (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:538:13)
at /Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:472:11
at ManagedPromise.invokeCallback_ (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1379:14)
at TaskQueue.execute_ (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2913:14)
at TaskQueue.executeNext_ (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2896:21)
at /Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2820:25
at /Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (node.js:438:9)
From: Task: WebDriver.createSession()
at Function.createSession (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:329:24)
at Driver (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:778:38)
at Direct.getNewDriver (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/built/driverProviders/direct.js:68:26)
at Runner.createBrowser (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/built/runner.js:190:43)
at /Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/built/runner.js:264:30
at _fulfilled (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/q/q.js:796:13)
at /Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/q/q.js:556:49
at runSingle (/Users/hoseasteele/.nvm/versions/node/v4.8.4/lib/node_modules/protractor/node_modules/q/q.js:137:13)
[11:39:54] E/launcher - Process exited with error code 199
答案 0 :(得分:0)
您使用的是旧版Chrome驱动程序。使用
更新所有驱动程序webdriver-manager update