code: public void quitOpera() {
      // running opera under the launcher
      if (runner != null) {
        if (runner.isOperaRunning() || runner.hasOperaCrashed()) {
          // Cut off the services connection to free the port
          getScopeServices().shutdown();
  
          // Quit Opera
          runner.stopOpera();
        }
      } else {
        // Quit with action as opera wasn't started with the launcher
        String operaPath = desktopUtils.getOperaPath();
        logger.info("OperaBinaryLocation retrieved from Opera: " + operaPath);
  
        if (operaPath.length() > 0) {
          settings.setBinary(new File(operaPath));
        }
  
        // Now create the OperaLauncherRunner that we have the binary path
        // So we can control the shutdown
        runner = new OperaLauncherRunner(settings);
  
        // Quit and wait for opera to quit properly (calls getScopeServices().shutdown)
        try {
          getScopeServices().quit(runner);
        } catch (IOException e) {
          throw new WebDriverException(e);
        }
  
      }
    }
docs: Quits Opera, cuts the connection to free the port and shuts down the getScopeServices().