Created
July 13, 2019 09:19
-
-
Save maxmckenzie/2653c5edeb2cbfa014f6d481051b2753 to your computer and use it in GitHub Desktop.
nightwatch config for cucumber and gherkin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://mucsi96.github.io/nightwatch-cucumber/ | |
const seleniumServer = require('selenium-server') | |
const phantomjs = require('phantomjs-prebuilt') | |
const chromedriver = require('chromedriver') | |
require('nightwatch-cucumber')({ | |
cucumberArgs: [ | |
'--compiler', 'js:babel-core/register', | |
'--require', 'features/step_definitions', | |
'--require', 'features/hooks.js', | |
'--format', 'node_modules/cucumber-pretty', | |
'features' | |
] | |
}) | |
module.exports = { | |
output_folder: 'reports', | |
custom_assertions_path: '', | |
live_output: false, | |
disable_colors: false, | |
selenium: { | |
start_process: true, | |
server_path: seleniumServer.path, | |
log_path: '', | |
host: '127.0.0.1', | |
port: 4444 | |
}, | |
test_settings: { | |
default: { | |
launch_url: 'http://localhost:8080', | |
selenium_port: 4444, | |
selenium_host: '127.0.0.1', | |
desiredCapabilities: { | |
browserName: 'phantomjs', | |
javascriptEnabled: true, | |
acceptSslCerts: true, | |
'phantomjs.binary.path': phantomjs.path | |
} | |
}, | |
chrome: { | |
desiredCapabilities: { | |
browserName: 'chrome', | |
javascriptEnabled: true, | |
acceptSslCerts: true | |
}, | |
selenium: { | |
cli_args: { | |
'webdriver.chrome.driver': chromedriver.path | |
} | |
} | |
}, | |
firefox: { | |
desiredCapabilities: { | |
browserName: 'firefox', | |
javascriptEnabled: true, | |
acceptSslCerts: true | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment