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
BrowserFetcherOptionsloggerFactory
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
SupportedBrowserloggerFactory
ILoggerFactory
Properties
BaseUrl
A download host to be used.
public string BaseUrl { get; set; }
Property Value
Browser
Gets the browser.
public SupportedBrowser Browser { get; set; }
Property Value
CacheDir
Determines the path to download browsers to.
public string CacheDir { get; set; }
Property Value
Platform
Gets the platform.
public Platform Platform { get; set; }
Property Value
WebProxy
Proxy used by the HttpClient in DownloadAsync(), DownloadAsync(string) and CanDownloadAsync(string).
public IWebProxy WebProxy { get; set; }
Property Value
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
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
BrowserTagBrowser 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
stringBrowser 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
stringBrowser to remove.