Beispiel #1
0
 /// <inheritdoc/>
 public Task <IPage> NewPageAsync(
     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,
     bool?ignoreHTTPSErrors      = null,
     ColorScheme?colorScheme     = null,
     string locale               = null,
     Dictionary <string, string> extraHttpHeaders = null)
 => NewPageAsync(new BrowserContextOptions
 {
     UserAgent         = userAgent,
     BypassCSP         = bypassCSP,
     JavaScriptEnabled = javaScriptEnabled,
     TimezoneId        = timezoneId,
     Geolocation       = geolocation,
     Permissions       = permissions,
     IsMobile          = isMobile,
     Offline           = offline,
     DeviceScaleFactor = deviceScaleFactor,
     HttpCredentials   = httpCredentials,
     HasTouch          = hasTouch,
     AcceptDownloads   = acceptDownloads,
     IgnoreHTTPSErrors = ignoreHTTPSErrors,
     ColorScheme       = colorScheme,
     Locale            = locale,
     ExtraHttpHeaders  = extraHttpHeaders,
 });
 /// <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?ignoreDefaultArgs          = null,
     string[] ignoredDefaultArgs     = null,
     Dictionary <string, string> env = null,
     Dictionary <string, object> firefoxUserPrefs = 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)
 => LaunchPersistentContextAsync(
     userAgent,
     new LaunchPersistentOptions
 {
     Headless           = headless,
     Args               = args,
     UserDataDir        = userDataDir,
     Devtools           = devtools,
     ExecutablePath     = executablePath,
     DownloadsPath      = downloadsPath,
     IgnoreHTTPSErrors  = ignoreHTTPSErrors,
     Timeout            = timeout,
     DumpIO             = dumpIO,
     SlowMo             = slowMo,
     IgnoreDefaultArgs  = ignoreDefaultArgs,
     IgnoredDefaultArgs = ignoredDefaultArgs,
     Env = env,
     FirefoxUserPrefs  = firefoxUserPrefs,
     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,
 });