grunt-html-dom-snapshot
Version:
Takes snapshots of the HTML markup on web pages - their immediate DOM content - and screenshots of their viewport - how they look like.
21 lines (18 loc) • 470 B
JavaScript
module.exports = {
detect: function (command) {
return !!command.keys
},
perform: function (grunt, target, client, command) {
let keys = command.keys
const separateKeys = Array.isArray(keys)
const message = separateKeys
? 'Send keys "' + keys.join('", "') + '".'
: 'Send text "' + keys + '".'
if (!separateKeys) {
keys = keys.split('')
}
grunt.output.writeln(message)
return client.keys(keys)
}
}