code: function (element) {
      var event = document.createEvent('MouseEvents');
      event.initMouseEvent('mousedown', true, true, window);
      element.dispatchEvent(event);
    }
docs: click element with virtual mouse.