Пример #1
0
 /// <inheritdoc />
 public Task <IBrowserContext> LaunchPersistentContextAsync(
     string userDataDir,
     bool?headless                   = null,
     string[] args                   = null,
     bool?devtools                   = null,
     string executablePath           = null,
     string downloadsPath            = null,
     bool?ignoreHTTPSErrors          = null,
     int?timeout                     = null,
     bool?dumpIO                     = null,
     int?slowMo                      = null,
     bool?ignoreAllDefaultArgs       = null,
     string[] ignoreDefaultArgs      = null,
     Dictionary <string, string> env = null,
     ProxySettings proxy             = null,
     string userAgent                = null,
     bool?bypassCSP                  = null,
     bool?javaScriptEnabled          = null,
     string timezoneId               = null,
     Geolocation geolocation         = null,
     ContextPermission[] permissions = null,
     bool?isMobile                   = null,
     bool?offline                    = null,
     decimal?deviceScaleFactor       = null,
     Credentials httpCredentials     = null,
     bool?hasTouch                   = null,
     bool?acceptDownloads            = null,
     ColorScheme?colorScheme         = null,
     string locale                   = null,
     Dictionary <string, string> extraHTTPHeaders = null,
     bool?chromiumSandbox           = null,
     bool?handleSIGINT              = null,
     bool?handleSIGTERM             = null,
     bool?handleSIGHUP              = null,
     RecordHarOptions recordHar     = null,
     RecordVideoOptions recordVideo = null)
 => LaunchPersistentContextAsync(
     userDataDir,
     new LaunchPersistentOptions
 {
     Headless             = headless,
     Args                 = args,
     UserDataDir          = userDataDir,
     Devtools             = devtools,
     ExecutablePath       = executablePath,
     DownloadsPath        = downloadsPath,
     IgnoreHTTPSErrors    = ignoreHTTPSErrors,
     Timeout              = timeout,
     DumpIO               = dumpIO,
     SlowMo               = slowMo,
     IgnoreAllDefaultArgs = ignoreAllDefaultArgs,
     IgnoreDefaultArgs    = ignoreDefaultArgs,
     Env               = env,
     Proxy             = proxy,
     UserAgent         = userAgent,
     BypassCSP         = bypassCSP,
     JavaScriptEnabled = javaScriptEnabled,
     TimezoneId        = timezoneId,
     Geolocation       = geolocation,
     Permissions       = permissions,
     IsMobile          = isMobile,
     Offline           = offline,
     DeviceScaleFactor = deviceScaleFactor,
     HttpCredentials   = httpCredentials,
     HasTouch          = hasTouch,
     AcceptDownloads   = acceptDownloads,
     ColorScheme       = colorScheme,
     Locale            = locale,
     ExtraHTTPHeaders  = extraHTTPHeaders,
     ChromiumSandbox   = chromiumSandbox,
     HandleSIGHUP      = handleSIGHUP,
     HandleSIGINT      = handleSIGINT,
     HandleSIGTERM     = handleSIGTERM,
     RecordHar         = recordHar,
     RecordVideo       = recordVideo,
 });