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 sealed class BrowserFetcher : IBrowserFetcher
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, ILoggerFactory)

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, ILoggerFactory loggerFactory = null)

Parameters

options BrowserFetcherOptions
loggerFactory ILoggerFactory

BrowserFetcher(SupportedBrowser, ILoggerFactory)

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, ILoggerFactory loggerFactory = null)

Parameters

browser SupportedBrowser
loggerFactory ILoggerFactory

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 HttpClient 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.

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.