internal Page(ConnectionScope scope, string guid, PageInitializer initializer) { _scope = scope; _channel = new PageChannel(guid, scope, this); MainFrame = initializer.MainFrame.Object; MainFrame.Page = this; _frames.Add(MainFrame); _viewportSize = initializer.ViewportSize; }
/// <inheritdoc/> public Task <IBrowserContext> NewContextAsync( ViewportSize viewport, 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, RecordHarOptions recordHar = null, RecordVideoOptions recordVideo = null, ProxySettings proxy = null, string storageStatePath = null, StorageState storageState = null) => NewContextAsync(new BrowserContextOptions { Viewport = viewport, 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, IgnoreHTTPSErrors = ignoreHTTPSErrors, ExtraHTTPHeaders = extraHTTPHeaders, RecordHar = recordHar, RecordVideo = recordVideo, Proxy = proxy, StorageStatePath = storageStatePath, StorageState = storageState, });
/// <inheritdoc/> public Task <IPage> NewPageAsync( ViewportSize viewport, 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, string videosPath = null, ViewportSize videoSize = null) => NewPageAsync(new BrowserContextOptions { Viewport = viewport, 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, VideosPath = videosPath, VideoSize = videoSize, });
/// <inheritdoc /> public Task <IBrowserContext> LaunchPersistentContextAsync( string userDataDir, ViewportSize viewport, 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, Viewport = viewport, 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, });