[]
Downloads and manages a version of a Chromium-based browser.
public class BrowserFetcher
Initializes a new instance of the BrowserFetcher class.
public BrowserFetcher()
Gets the default revision of Chromium browser to check or download.
The value of this property is a subject to change in the future versions.
public static string DefaultRevision { get; }
Gets or sets the destination folder for the downloads.
If this property is not set, the downloads are stored to [root]/.local-chromium, where [root] is where the project binaries are located.
public string DestinationFolder { get; set; }
Gets or sets the browser platform. Defaults to the current platform.
public Platform Platform { get; set; }
Gets or sets the specific Chromium revision to check or download.
If this property is not set, the DefaultRevision is used.
public string Revision { get; set; }
Gets or sets the Proxy to be used by the WebClient.
public IWebProxy WebProxy { get; set; }
Initiates a HEAD request to check if the Chromium browser is available for download.
public bool CanDownload()
Downloads the browser, if necessary, and returns a path to Chromium executable.
public string GetDownloadedPath(bool downloadIfNotExists = true)
downloadIfNotExists
boolWhether to download the browser if it doesn't exist in the destination folder.
A path to Chromium executable or null if the browser is not downloaded.
Gets the Url for downloading Chromium browser.
public string GetDownloadUrl()
Returns a list of all revisions for the selected Platform available locally on disk.
public List<string> GetLocalRevisions()
The list of available revisions.
Gets the path to the Google Chrome browser executable installed in the operating system.
public static string GetSystemChromePath()
The path to the browser executable, or null if the browser was not found.
Gets the path to Microsoft Edge browser executable installed in the operating system.
public static string GetSystemEdgePath()
The path to the browser executable, or null if the browser was not found.
Removes a downloaded revision for the selected Platform.
public void RemoveLocalRevision(string revision)
revision
stringRevision to remove.
Occurs when an asynchronous download operation successfully transfers some or all of the data.
public event DownloadProgressChangedEventHandler DownloadProgressChanged