activateTab(tabIndex, windowIndex) {
    log.debug('[RemoteApi] Setting tab ' + tabIndex + ' active on window ' + windowIndex);
    let p;
    if (typeof windowIndex === 'number') {
      const win = BrowserWindow.getAllWindows()[windowIndex];
      if (!win) {
        log.warn('[RemoteApi] Window ' + windowIndex + ' not found');
        return Promise.reject(new Error('Window for given index does not exists'));
      }
      p = Promise.resolve(win);
    } else {
      p = this.getActiveWindow();
    }
    return p
    .then((win) => this.activateTabForWindow(tabIndex, win));
  }
/**
   * Sets a tab active for given window.
   * Active window is used if the index is not provided.
   *
   * @param {Number} tabIndex Index of the tab to set active.
   * @param {?Number} windowIndex The index of the window
   * @return {Promise} Promise resolved when command was send.
   */
Sets a tab active for given window.
Active window is used if the index is not provided.

@param {Number} tabIndex Index of the tab to set active.
@param {?Number} windowIndex The index of the window
@return {Promise} Promise resolved when command was send.
Sets a tab active for given window . Active window is used if the index is not provided . @param { Number } tabIndex Index of the tab to set active . @param { ?Number } windowIndex The index of the window @return { Promise } Promise resolved when command was send .
activateTab(tabIndex, windowIndex) {
    log.debug('[RemoteApi] Setting tab ' + tabIndex + ' active on window ' + windowIndex);
    let p;
    if (typeof windowIndex === 'number') {
      const win = BrowserWindow.getAllWindows()[windowIndex];
      if (!win) {
        log.warn('[RemoteApi] Window ' + windowIndex + ' not found');
        return Promise.reject(new Error('Window for given index does not exists'));
      }
      p = Promise.resolve(win);
    } else {
      p = this.getActiveWindow();
    }
    return p
    .then((win) => this.activateTabForWindow(tabIndex, win));
  }
activateTab ( tabIndex , windowIndex ) { log . debug ( '[RemoteApi] Setting tab ' + tabIndex + ' active on window ' + windowIndex ) ; let p ; if ( typeof windowIndex === 'number' ) { const win = BrowserWindow . getAllWindows ( ) [ windowIndex ] ; if ( ! win ) { log . warn ( '[RemoteApi] Window ' + windowIndex + ' not found' ) ; return Promise . reject ( new Error ( 'Window for given index does not exists' ) ) ; } p = Promise . resolve ( win ) ; } else { p = this . getActiveWindow ( ) ; } return p . then ( ( win ) => this . activateTabForWindow ( tabIndex , win ) ) ; }
Sets a tab active for given window.
Sets a tab active for given window .