I want to use the puppeteer-sharp libary in a webservice which is deployed in an IIS environment.
I already know that the download of the chromium is successfully (I can find the file on my computer). Unfortunately, as far as I know from debugging, the Task bf.DownloadAsync does not terminate.
[Route("f")]
[HttpGet]
public void F()
{
g().Wait();
}
public static async Task g()
{
BrowserFetcher bf = new BrowserFetcher(new BrowserFetcherOptions()
{
Path = "C:/Users/user/Downloads"
});
await bf.DownloadAsync(BrowserFetcher.DefaultRevision);
var browser = await Puppeteer.LaunchAsync(new LaunchOptions
{
Headless = true
});
var page = await browser.NewPageAsync();
await page.GoToAsync("http://www.google.com");
await page.ScreenshotAsync("C:/Users/user/Downloads/myOutPutFile.png");
}
I expected that the task to terminate, resulting in a png-File in my download directory. The actual result is that bf.DownloadAsync never terminates.