Table of Contents

Class BrowserFetcher

Namespace
PuppeteerSharp
Assembly
PuppeteerSharp.dll

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public class BrowserFetcher : IBrowserFetcher, IDisposable
Inheritance
BrowserFetcher
Implements

Constructors

BrowserFetcher()

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public BrowserFetcher()

BrowserFetcher(BrowserFetcherOptions)

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public BrowserFetcher(BrowserFetcherOptions options)

Parameters

options BrowserFetcherOptions

BrowserFetcher(SupportedBrowser)

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public BrowserFetcher(SupportedBrowser browser)

Parameters

browser SupportedBrowser

Properties

BaseUrl

A download host to be used.

public string BaseUrl { get; set; }

Property Value

string

Browser

Gets the browser.

public SupportedBrowser Browser { get; set; }

Property Value

SupportedBrowser

CacheDir

Determines the path to download browsers to.

public string CacheDir { get; set; }

Property Value

string

Platform

Gets the platform.

public Platform Platform { get; set; }

Property Value

Platform

WebProxy

Proxy used by the WebClient in DownloadAsync(), DownloadAsync(string) and CanDownloadAsync(string).

public IWebProxy WebProxy { get; set; }

Property Value

IWebProxy

Methods

CanDownloadAsync(string)

The method initiates a HEAD request to check if the revision is available.

public Task<bool> CanDownloadAsync(string revision)

Parameters

revision string

Returns

Task<bool>

Whether the version is available or not.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

Dispose WebClient.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Indicates whether disposal was initiated by Dispose() operation.

DownloadAsync()

Downloads the revision.

public Task<InstalledBrowser> DownloadAsync()

Returns

Task<InstalledBrowser>

Task which resolves to the completed download.

DownloadAsync(BrowserTag)

Downloads the revision.

public Task<InstalledBrowser> DownloadAsync(BrowserTag tag)

Parameters

tag BrowserTag

Browser tag.

Returns

Task<InstalledBrowser>

Task which resolves to the completed download.

DownloadAsync(string)

Downloads the revision.

public Task<InstalledBrowser> DownloadAsync(string buildId)

Parameters

buildId string

Returns

Task<InstalledBrowser>

Task which resolves to the completed download.

GetExecutablePath(string)

Gets the executable path.

public string GetExecutablePath(string buildId)

Parameters

buildId string

Browser buildId.

Returns

string

The executable path.

GetInstalledBrowsers()

A list of all browsers available locally on disk.

public IEnumerable<InstalledBrowser> GetInstalledBrowsers()

Returns

IEnumerable<InstalledBrowser>

The available browsers.

Uninstall(string)

Removes a downloaded browser.

public void Uninstall(string buildId)

Parameters

buildId string

Browser to remove.

Events

DownloadProgressChanged

Occurs when download progress in DownloadAsync()/DownloadAsync(string) changes.

public event DownloadProgressChangedEventHandler DownloadProgressChanged

Event Type

DownloadProgressChangedEventHandler