'use strict';
/* global afterEach, browser */

//var  filename = path.resolve(__dirname, '../browser-output.log');
// var screenshots = require('protractor-screenshots');

// fs.unlinkFile(filename);

var browser2;

afterEach(function() {
	console.log('after...');

	return browser.manage().logs().get('browser')
		.then(function(browserLogs) {
			// browserLogs is an array of objects with level and message fields
			browserLogs.forEach(function(log) {
				console.log(log.message);
				// log.message.parameters && log.message.parameters.forEach(function(p) {
				// 	console.lof(p.value);
				// 	// fs.writeFileSync(filename, p.value);
				// });
			});
		});
});