public async Task <IBrowserContext> LaunchPersistentContextAsync(string userDataDir, BrowserTypeLaunchPersistentContextOptions options = default)
        {
            options ??= new BrowserTypeLaunchPersistentContextOptions();
            var context = (await _channel.LaunchPersistentContextAsync(
                               userDataDir,
                               headless: options.Headless,
                               channel: options.Channel,
                               executablePath: options.ExecutablePath,
                               args: options.Args,
                               proxy: options.Proxy,
                               downloadsPath: options.DownloadsPath,
                               tracesDir: options.TracesDir,
                               chromiumSandbox: options.ChromiumSandbox,
                               handleSIGINT: options.HandleSIGINT,
                               handleSIGTERM: options.HandleSIGTERM,
                               handleSIGHUP: options.HandleSIGHUP,
                               timeout: options.Timeout,
                               env: options.Env,
                               devtools: options.Devtools,
                               slowMo: options.SlowMo,
                               acceptDownloads: options.AcceptDownloads,
                               ignoreHTTPSErrors: options.IgnoreHTTPSErrors,
                               bypassCSP: options.BypassCSP,
                               viewportSize: options.ViewportSize,
                               screenSize: options.ScreenSize,
                               userAgent: options.UserAgent,
                               deviceScaleFactor: options.DeviceScaleFactor,
                               isMobile: options.IsMobile,
                               hasTouch: options.HasTouch,
                               javaScriptEnabled: options.JavaScriptEnabled,
                               timezoneId: options.TimezoneId,
                               geolocation: options.Geolocation,
                               locale: options.Locale,
                               permissions: options.Permissions,
                               extraHTTPHeaders: options.ExtraHTTPHeaders,
                               offline: options.Offline,
                               httpCredentials: options.HttpCredentials,
                               colorScheme: options.ColorScheme,
                               reducedMotion: options.ReducedMotion,
                               recordHarPath: options.RecordHarPath,
                               recordHarOmitContent: options.RecordHarOmitContent,
                               recordVideo: Browser.GetVideoArgs(options.RecordVideoDir, options.RecordVideoSize),
                               ignoreDefaultArgs: options.IgnoreDefaultArgs,
                               ignoreAllDefaultArgs: options.IgnoreAllDefaultArgs,
                               baseUrl: options.BaseURL,
                               forcedColors: options.ForcedColors).ConfigureAwait(false)).Object;

            // TODO: unite with a single browser context options type which is derived from channels
            context.Options = new()
            {
                RecordVideoDir       = options.RecordVideoDir,
                RecordVideoSize      = options.RecordVideoSize,
                RecordHarPath        = options.RecordHarPath,
                RecordHarOmitContent = options.RecordHarOmitContent,
            };
            ((Core.Tracing)context.Tracing).LocalUtils = Playwright.Utils;
            return(context);
        }
 /// <inheritdoc />
 public async Task <IBrowserContext> LaunchPersistentContextAsync(string userDataDir, LaunchPersistentOptions options)
 => (await _channel.LaunchPersistentContextAsync(userDataDir, options ?? new LaunchPersistentOptions()).ConfigureAwait(false)).Object;
 /// <inheritdoc/>
 public async Task <IBrowserContext> LaunchPersistentContextAsync(
     string userDataDir,
     bool?headless             = default,
     BrowserChannel channel    = default,
     string executablePath     = default,
     IEnumerable <string> args = default,
     Proxy proxy          = default,
     string downloadsPath = default,
     bool?chromiumSandbox = default,
     bool?handleSIGINT    = default,
     bool?handleSIGTERM   = default,
     bool?handleSIGHUP    = default,
     float?timeout        = default,
     IEnumerable <KeyValuePair <string, string> > env = default,
     bool?devtools                    = default,
     float?slowMo                     = default,
     bool?acceptDownloads             = default,
     bool?ignoreHTTPSErrors           = default,
     bool?bypassCSP                   = default,
     ViewportSize viewportSize        = default,
     ScreenSize screenSize            = default,
     string userAgent                 = default,
     float?deviceScaleFactor          = default,
     bool?isMobile                    = default,
     bool?hasTouch                    = default,
     bool?javaScriptEnabled           = default,
     string timezoneId                = default,
     Geolocation geolocation          = default,
     string locale                    = default,
     IEnumerable <string> permissions = default,
     IEnumerable <KeyValuePair <string, string> > extraHTTPHeaders = default,
     bool?offline = default,
     HttpCredentials httpCredentials        = default,
     ColorScheme colorScheme                = default,
     string recordHarPath                   = default,
     bool?recordHarOmitContent              = default,
     string recordVideoDir                  = default,
     RecordVideoSize recordVideoSize        = default,
     IEnumerable <string> ignoreDefaultArgs = default,
     bool?ignoreAllDefaultArgs              = default) =>
 (await _channel.LaunchPersistentContextAsync(
      userDataDir,
      headless,
      channel,
      executablePath,
      args,
      proxy,
      downloadsPath,
      chromiumSandbox,
      handleSIGINT,
      handleSIGTERM,
      handleSIGHUP,
      timeout,
      env,
      devtools,
      slowMo,
      acceptDownloads,
      ignoreHTTPSErrors,
      bypassCSP,
      viewportSize,
      screenSize,
      userAgent,
      deviceScaleFactor,
      isMobile,
      hasTouch,
      javaScriptEnabled,
      timezoneId,
      geolocation,
      locale,
      permissions,
      extraHTTPHeaders,
      offline,
      httpCredentials,
      colorScheme,
      recordHarPath,
      recordHarOmitContent,
      recordVideoDir,
      recordVideoSize,
      ignoreDefaultArgs,
      ignoreAllDefaultArgs).ConfigureAwait(false)).Object;