I'm new to webdriverio. I don't understand how it's supposed to be configured and used within a node application. How do you run 'spec' tests when webdriverio is being imported? Can it be done?
// based on http://webdriver.io/guide.html
var webdriverio = require('webdriverio');
var options = {
desiredCapabilities: {
browserName: 'firefox'
},
specs: './test/spec/**' // why doesn't this work, when it would work when run from the wdio cli
};
webdriverio
.remote(options)
.init()
.url('http://www.google.com')
.title(function(err, res) {
console.log('Title was: ' + res.value);
})
.end();