Commit a2853a8a authored by ioedeveloper's avatar ioedeveloper

Updated executeScript to use data-attributes

parent 61faa0f6
...@@ -120,6 +120,7 @@ class Terminal extends Plugin { ...@@ -120,6 +120,7 @@ class Terminal extends Plugin {
self._view.input.setAttribute('spellcheck', 'false') self._view.input.setAttribute('spellcheck', 'false')
self._view.input.setAttribute('contenteditable', 'true') self._view.input.setAttribute('contenteditable', 'true')
self._view.input.setAttribute('id', 'terminalCliInput') self._view.input.setAttribute('id', 'terminalCliInput')
self._view.input.setAttribute('data-id', 'terminalCliInput')
self._view.input.innerText = '\n' self._view.input.innerText = '\n'
self._view.cli = yo` self._view.cli = yo`
......
...@@ -3,8 +3,8 @@ const EventEmitter = require('events') ...@@ -3,8 +3,8 @@ const EventEmitter = require('events')
class ExecuteScript extends EventEmitter { class ExecuteScript extends EventEmitter {
command (script) { command (script) {
this.api this.api
.clearValue('#terminalCliInput') .clearValue('span[data-id="terminalCliInput"]')
.click('#terminalCli') .click('div[data-id="terminalCli"]')
.keys(script) .keys(script)
.keys(this.api.Keys.ENTER) .keys(this.api.Keys.ENTER)
.keys(this.api.Keys.ENTER) // that's a bug... sometimes we need to press 2 times to execute a command .keys(this.api.Keys.ENTER) // that's a bug... sometimes we need to press 2 times to execute a command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment