Я просматривал переполнение стека, но не смог найти никого, у кого была такая же ситуация, как у меня.
Я пытаюсь открыть транспортир webdriver из package.json, используя npm run start
, и я получил следующее сообщение об ошибке (см. Ниже).
Что это? и как мне это исправить?
[16:21:15] I/launcher - Running 1 instances of WebDriver
[16:21:15] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[16:21:15] E/launcher - Error code: 135
[16:21:15] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
[16:21:15] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/selenium-webdriver/http/index.js:238:15)
at ClientRequest.emit (events.js:182:13)
at Socket.socketErrorListener (_http_client.js:399:9)
at Socket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
From: Task: WebDriver.createSession()
at Function.createSession (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/selenium-webdriver/index.js:626:16)
at Hosted.getNewDriver (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/q/q.js:834:54)
at /Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/q/q.js:863:30
at Promise.promise.promiseDispatch (/Users/jacquelinegeorge/Documents/JSworkspace/LocatorTraining/node_modules/q/q.js:796:13)
[16:21:15] E/launcher - Process exited with error code 135
npm ERR! code ELIFECYCLE
npm ERR! errno 135
npm ERR! LocatorTraining@ protractor: `protractor configurations.js`
npm ERR! Exit status 135
npm ERR!
npm ERR! Failed at the LocatorTraining@ protractor script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jacquelinegeorge/.npm/_logs/2018-11-08T16_21_15_711Z-debug.log
здесь также есть файл package.json
{
"name": "LocatorTraining",
"dependencies": {
"protractor": "^5.4.1",
"jasmine-data-provider": "^2.2.0",
"protractor-jasmine2-html-reporter":"^0.0.7"
},
"scripts": {
"webdriver-update": "./node_modules/.bin/webdriver-manager update",
"webdriver-start": "./node_modules/.bin/webdriver-manager start",
"protractor": "./node_modules/.bin/protractor configurations.js",
"SmokeTest": "./node_modules/.bin/protractor configurations.js --suites Smoke",
"RegressionTest": "./node_modules/.bin/protractor configurations.js --suites Regression",
"start": "npm run webdriver-update && npm run webdriver-start"
}
}