Cannot use CodeceptJs on MacOS
See original GitHub issueWhat are you trying to achieve?
Run CodeceptJs tests on MacOs with Safari and/or Chrome. I executed the command npx codecptjs run
What do you get instead?
Could not load helper WebDriver from module ‘./helper/WebDriver’:
Required modules are not installed.
RUN: [sudo] npm install -g webdriverio@^5.2.2
Error:
at createHelpers (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/lib/container.js:152:13)
at Function.create (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/lib/container.js:32:25)
at Codecept.init (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/lib/codecept.js:55:15)
at Command.module.exports (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/lib/command/run.js:33:14)
at Command.listener (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/node_modules/commander/index.js:315:8)
at emitTwo (events.js:125:13)
at Command.emit (events.js:213:7)
at Command.parseArgs (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/node_modules/commander/index.js:654:12)
at Command.parse (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/node_modules/commander/index.js:474:21)
at Object.<anonymous> (/Users/jessicasuzuki/.npm/_npx/33848/lib/node_modules/codeceptjs/bin/codecept.js:142:9)
Provide test source code if related
Feature('My First Test');
Scenario('test something', (I) => {
I.amOnPage('http://www.google.com');
I.seeElement('img');
});
Details
- CodeceptJS version: 2.0.8
- NodeJS Version: v8.6.0
- Operating System: Mac OS 10.14.3
- WebDriverIO version (if related): 5.7.6
- Configuration file:
exports.config = {
tests: './*_test.js',
output: './output',
helpers: {
WebDriver: {
url: 'http://localhost',
browser: 'safari'
}
},
include: {
I: './steps_file.js'
},
bootstrap: null,
mocha: {},
name: 'codeceptjs'
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Cannot use CodeceptJs on MacOS · Issue #1589 - GitHub
Run CodeceptJs tests on MacOs with Safari and/or Chrome. I executed the command npx codecptjs run What do you get instead?
Read more >Installation | CodeceptJS
We recommend to install them manually or use NPM packages: Selenium Standalone (opens new window) to install and run Selenium, ChromeDriver, ...
Read more >javascript - Codeceptjs only works when installed globally
When I open the instructions to install CodeceptJS it offers the option to install the node_module both locally and globally. However only global...
Read more >codeceptjs - npm
Install · CodeceptJS requires Node.js version 8.9.1+ or later. · To use the parallel tests execution, requiring Node.js version 11.7 or later.
Read more >Codeception/CodeceptJS - Gitter
Error: Can't connect to WebDriver. Error: Failed to create session. unknown error: cannot find Chrome binary (Driver info: chromedriver=2.43.600210 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A colleague of mine had the same problem. It seems that newer versions of WebDriverIO (> 5.2.2) are breaking CodeceptJS.
We fixed by removing the newer WebDriverIO version with
npm remove -g webdriverio
and installing the version Codecept asks for:npm install -g webdriverio@5.2.2
(we had to remove the^
from the command to install the correct version)Edit: webdriverio v5.2.2 gave the error
this.browser.setWindowSize is not a function
. With v5.7.8 we got it working.got same error