I'm using Puppeteer Sharp
in my .NET application to do some webpage automation tasks. However, I have to deploy my app in an environment that only has intranet access, which means Puppeteer's BrowserFetcher
class is unable to download Chromium from the internet, since it cannot access the Chromium repositories.
Is it possible to bundle a copy of Chromium with my app, so Puppeteer does not have to download it? How would I do that? I'm not finding much in the docs about this...
You can use the LaunchOptions.ExecutablePath property. If you use ExecutablePath
you don't even need to call BrowserFetcher
. It would look something like this:
var options = new LaunchOptions
{
Headless = true,
ExecutablePath = "<CHROME.EXE FULL PATH>"
};
using (var browser = await Puppeteer.LaunchAsync(options))
{
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With