docs: function (script, args, timeout, hash, data) {
      var deferred = Q.defer();
      var ret = JSON.parse(data);
      var checker = function (yData) {
        if (JSON.parse(yData).value.userRet === true) {
          this.events.emit('driver:message', {key: 'waitFor', value: '', uuid: hash, hash: hash});
          deferred.resolve();
        } else {
          Q.when(this.webdriverClient.execute.bind(this.webdriverClient, {script: script, arguments: args})())
            .then(checker);
        }
      }.bind(this);
  
      setTimeout(function () {
        this.events.emit('driver:message', {key: 'waitFor', value: 'Interrupted by timeout', uuid: hash, hash: hash});
        deferred.resolve();
      }.bind(this), timeout);
  
      if (ret.value.userRet === true) {
        this.events.emit('driver:message', {key: 'waitFor', value: '', uuid: hash, hash: hash});
        deferred.resolve();
      } else {
        Q.when(this.webdriverClient.execute.bind(this.webdriverClient, {script: script, arguments: args})())
          .then(checker);
      }
  
      return deferred.promise;
    }