code: public void addBrowser(DesiredCapabilities cap, int instances) {
      String s = cap.getBrowserName();
      if (s == null || "".equals(s)) {
        throw new InvalidParameterException(cap + " does seems to be a valid browser.");
      }
      if (cap.getPlatform() == null) {
        cap.setPlatform(Platform.getCurrent());
      }
      cap.setCapability(RegistrationRequest.MAX_INSTANCES, instances);
      registrationRequest.getConfiguration().capabilities.add(cap);
      registrationRequest.getConfiguration().fixUpCapabilities();
    }
docs: Adding the browser described by the capability, automatically finding out what platform the
  node is launched from
  
  @param cap       describing the browser
  @param instances number of times this browser can be started on the node.