mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 16:43:26 +02:00
Refactor InputAgent into STFService. Support copypasting (only pasting implemented in the UI right now though).
This commit is contained in:
@@ -78,6 +78,20 @@ module.exports = function ControlServiceFactory(
|
||||
})
|
||||
}
|
||||
|
||||
this.paste = function(text) {
|
||||
var tx = TransactionService.create(target)
|
||||
socket.emit('clipboard.paste', channel, tx.channel, {
|
||||
text: text
|
||||
})
|
||||
return tx
|
||||
}
|
||||
|
||||
this.copy = function() {
|
||||
var tx = TransactionService.create(target)
|
||||
socket.emit('clipboard.copy', channel, tx.channel)
|
||||
return tx
|
||||
}
|
||||
|
||||
this.shell = function(command) {
|
||||
var tx = TransactionService.create(target)
|
||||
socket.emit('shell.command', channel, tx.channel, {
|
||||
|
||||
Reference in New Issue
Block a user