docs: public static SafariOptions fromCapabilities(Capabilities capabilities)
        throws WebDriverException {
      if (capabilities instanceof SafariOptions) {
        return (SafariOptions) capabilities;
      }
      Object cap = capabilities.getCapability(SafariOptions.CAPABILITY);
      if (cap instanceof SafariOptions) {
        return (SafariOptions) cap;
      } else if (cap instanceof Map) {
        return new SafariOptions(new MutableCapabilities(((Map<String, ?>) cap)));
      } else {
        return new SafariOptions();
      }
    }