Skip to content

Instantly share code, notes, and snippets.

@klamping
Created May 9, 2017 00:26
Show Gist options
  • Save klamping/3b58b55fe8462736572ad8835c7cf2c1 to your computer and use it in GitHub Desktop.
Save klamping/3b58b55fe8462736572ad8835c7cf2c1 to your computer and use it in GitHub Desktop.
wdio.conf.js extend options
// require prod configuration
var prodConfig = require('./wdio.conf.js').config;
// Custom properties
var localConfig = {
capabilities: [{
browserName: 'chrome'
}],
baseUrl: 'http://localhost:8303'
services: ['selenium-standalone']
};
// clone prod config and add new properties/overrides
exports.config = Object.assign(prodConfig, localConfig);
// delete any unwanted properties
delete exports.config.user;
delete exports.config.key;
delete exports.config.sauceConnect;
// require prod configuration
var prodConfig = require('./wdio.conf.js').config;
// Custom properties
var localConfig = {
capabilities: [{
browserName: 'chrome'
}],
baseUrl: 'http://localhost:8303'
services: ['selenium-standalone']
};
// clone prod config and add new properties/overrides
var newConfig = Object.assign(prodConfig, localConfig);
// delete any unwanted properties
delete newConfig.user;
delete newConfig.key;
delete newConfig.sauceConnect;
exports.config = newConfig;
// require prod configuration
var prodConfig = require('./wdio.conf.js').config;
// clone prod config and add new properties/overrides
var localConfig = Object.assign(prodConfig, {
capabilities: [{
browserName: 'chrome'
}],
baseUrl: 'http://localhost:8303'
services: ['selenium-standalone']
});
// delete any unwanted properties
delete localConfig.user;
delete localConfig.key;
delete localConfig.sauceConnect;
exports.config = localConfig;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment