function input(text, input) {
  let holmesInput = document.getElementById('search');
  if (input) {
    holmesInput = input;
  }
  return new Promise(resolve => {
    if (holmesInput instanceof HTMLInputElement) {
      holmesInput.value = text;
    } else {
      holmesInput.textContent = text;
    }
    holmesInput.dispatchEvent(new Event('input'));
    resolve('input dispatched.');
  });
}
Enter a string into this Holmes input
@param  {string}      text text to input
@param  {HTMLElement} element to input in (optional)
@return {Promise}     resolves when the input has been done