dukhanov / wdio-webdriver-service Goto Github PK
View Code? Open in Web Editor NEWWebdriverIO service to start & stop WebDriver component (geckodriver, chrome driver)
License: MIT License
WebdriverIO service to start & stop WebDriver component (geckodriver, chrome driver)
License: MIT License
As title
I'm trying to use wdio-webdriver-service
to run geckodriver
in my test project and it seems not to work, failing with the error:
TypeError: Service is not a constructor
Below are the details, please let me know if there's anything else I can do to help fix this.
I'm using Node.js v10.13.0 on Windows 10 with these dependencies:
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@babel/register": "^7.0.0",
"@wdio/cli": "^5.1.1",
"@wdio/dot-reporter": "^5.1.0",
"@wdio/local-runner": "^5.1.1",
"@wdio/mocha-framework": "^5.1.0",
"@wdio/spec-reporter": "^5.1.0",
"@wdio/sync": "^5.1.0",
"chai": "^4.2.0",
"wdio-webdriver-service": "^0.1.6",
"webdriverio": "^5.0.3"
}
Relevant bits from my wdio.conf.js
file:
services: ['webdriver'], webDriverType: 'geckodriver',
webDriverLogs: './',
webDriverArgs: ['--port 4444', '-v','-b "C:\\Users\\urig\\AppData\\Local\\Mozilla Firefox\\firefox.exe"'],
webDriverKillProcess: false,
No log files were created so here is what I see in stdout:
> [email protected] test C:\Users\urig\...\tests\end2end
> wdio wdio.conf.js
2019-01-03T09:05:46.388Z DEBUG wdio-config: wdio-sync found, running tests synchronous
2019-01-03T09:05:47.846Z DEBUG wdio-cli:run: Run suite with config wdio.conf.js and params { _: [ 'wdio.conf.js' ],
'$0': 'node_modules\\@wdio\\cli\\bin\\wdio.js' }
Stdout:
2019-01-03T09:05:47.893Z INFO wdio-cli:Launcher: Run onPrepare hook
2019-01-03T09:05:47.897Z INFO wdio-local-runner: Start worker 0-0 with arg: wdio.conf.js
[0-0] 2019-01-03T09:05:48.161Z DEBUG wdio-config: wdio-sync found, running tests synchronous
[0-0] 2019-01-03T09:05:48.518Z INFO wdio-local-runner: Run worker command: run
[0-0] 2019-01-03T09:05:48.521Z DEBUG wdio-local-runner:utils: initialise wdio service "webdriver"
[0-0] 2019-01-03T09:05:48.576Z DEBUG wdio-local-runner:utils: init remote session
[0-0] 2019-01-03T09:05:48.642Z INFO webdriver: [POST] http://127.0.0.1:4444/session
[0-0] 2019-01-03T09:05:48.642Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'firefox' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'firefox' } }
[0-0] 2019-01-03T09:05:49.657Z INFO webdriver: Retrying 1/3
2019-01-03T09:05:49.657Z INFO webdriver: [POST] http://127.0.0.1:4444/session
[0-0] 2019-01-03T09:05:49.657Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'firefox' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'firefox' } }
[0-0] 2019-01-03T09:05:50.660Z INFO webdriver: Retrying 2/3
2019-01-03T09:05:50.660Z INFO webdriver: [POST] http://127.0.0.1:4444/session
[0-0] 2019-01-03T09:05:50.660Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'firefox' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'firefox' } }
[0-0] 2019-01-03T09:05:51.663Z INFO webdriver: Retrying 3/3
2019-01-03T09:05:51.663Z INFO webdriver: [POST] http://127.0.0.1:4444/session
[0-0] 2019-01-03T09:05:51.663Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'firefox' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'firefox' } }
2019-01-03T09:05:52.787Z DEBUG wdio-local-runner: Runner 0-0 finished with exit code 1
Stderr:
[0-0] 2019-01-03T09:05:48.524Z ERROR wdio-local-runner:utils: TypeError: Service is not a constructor
at initialiseServices (C:\Users\urig\...\tests\end2end\node_modules\@wdio\runner\src\utils.js:50:38)
at Runner.run (C:\Users\urig\...\tests\end2end\node_modules\@wdio\runner\src\index.js:52:9)
at process.on.m (C:\Users\urig\...\tests\end2end\node_modules\@wdio\local-runner\src\run.js:24:5)
at process.emit (events.js:187:15)
at process.emit (C:\Users\urig\...\tests\end2end\node_modules\source-map-support\source-map-support.js:461:21)
at emit (internal/child_process.js:812:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[0-0] 2019-01-03T09:05:49.657Z WARN webdriver: Request failed due to Error: connect ECONNREFUSED 127.0.0.1:4444
[0-0] 2019-01-03T09:05:50.660Z WARN webdriver: Request failed due to Error: connect ECONNREFUSED 127.0.0.1:4444
[0-0] 2019-01-03T09:05:51.663Z WARN webdriver: Request failed due to Error: connect ECONNREFUSED 127.0.0.1:4444
[0-0] 2019-01-03T09:05:52.665Z ERROR webdriver: Request failed due to Error: Error: connect ECONNREFUSED 127.0.0.1:4444
at Request._callback (C:\Users\urig\...\tests\end2end\node_modules\webdriver\src\request.js:95:27)
at self.callback (C:\Users\urig\...\tests\end2end\node_modules\request\request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.onRequestError (C:\Users\urig\...\tests\end2end\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:182:13)
at ClientRequest.EventEmitter.emit (domain.js:442:20)
at Socket.socketErrorListener (_http_client.js:391:9)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
[0-0] 2019-01-03T09:05:52.670Z ERROR wdio-runner: Error: Error: connect ECONNREFUSED 127.0.0.1:4444
at Request._callback (C:\Users\urig\...\tests\end2end\node_modules\webdriver\src\request.js:95:27)
at self.callback (C:\Users\urig\...\tests\end2end\node_modules\request\request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.onRequestError (C:\Users\urig\...\tests\end2end\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:182:13)
at ClientRequest.EventEmitter.emit (domain.js:442:20)
at Socket.socketErrorListener (_http_client.js:391:9)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
Worker Error:
Error: Error: connect ECONNREFUSED 127.0.0.1:4444
at Request._callback (C:\Users\urig\...\tests\end2end\node_modules\webdriver\src\request.js:95:27)
at self.callback (C:\Users\urig\...\tests\end2end\node_modules\request\request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.onRequestError (C:\Users\urig\...\tests\end2end\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:182:13)
at ClientRequest.EventEmitter.emit (domain.js:442:20)
at Socket.socketErrorListener (_http_client.js:391:9)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
Test Suites: 0 passed, 1 failed, 1 total (100% completed)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.