有什么方法可以使用Nightwatch js将结果导出到db中? 如果有的话,请给我示例示例
var connection = mysql.createConnection({
host : 'x',
user : 'x',
password : 'x',
database: 'x'
});
connection.connect();
var sql = 'SELECT someuserlist';
// check for browser logs, if any error exist fail the test
afterEach(function() {
browser.manage().logs().get('browser').then(function(browserLog) {
expect(browserLog.length).toEqual(0);
// Uncomment to actually see the log.
console.log('log: ' + require('util').inspect(browserLog));
});
});