Questions tagged [puppeteer-sharp]

A .NET port of the official Node.JS Puppeteer API.

Puppeteer Sharp is a .NET port of the official Node.JS Puppeteer API.

Minimum requirements:

.NET Framework 4.6.1 and .NET Core 2.0
Windows 8 or Windows Server 2012

Resources:

Community:

226 questions
4
votes
1 answer

How to generate images of web pages in a high performance environment?

I am trying to generate images of web pages in under a second in a server-side environment. The requests could come in parallel, at the same time from the web. To that end, I am using Puppeteer-Sharp library which works pretty well. On the back…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
4
votes
1 answer

Single page PDF in puppeetersharp

I have tried to convert a web page to single page pdf, but there is no support for this. Is there any workaround to achieve this requirement? I have already tried by setting the pdf page size from html content size. But it is not working as expected…
john
  • 57
  • 1
  • 5
3
votes
1 answer

Can I use the ScreenshotAsync method to save the screenshot to memory instead of disk?

I am using PuppeteerSharp to generate a PDF from a locally-hosted HTML template, and want the PDF to be non-searchable, meaning that the PDF is truly just one big image within the PDF. I have chosen to take this approach because I want to make it…
m.willes
  • 63
  • 5
3
votes
1 answer

PuppeteerSharp and Page Level Proxies

I know this is possible using Puppeteer in js, but I'm wondering if anyone has figured out how to proxy on a page level in PuppeteerSharp (different proxies for different tabs)?. it seems I can catch the request, but I'm not sure how to adjust the…
clamchoda
  • 4,411
  • 2
  • 36
  • 74
3
votes
2 answers

PuppeteerSharp: Failed to launch Chromium

The error started to happen after updating google chrome to the latest version: 89.0.4389.82 (Official Build) (64-bit). OS: Windows 10 Error: PuppeteerSharp.ChromiumProcessException: Failed to launch Chromium!…
3
votes
0 answers

Puppeteer Sharp Stop Downloading after a while

Here are my starting settings (It is NOT headless and you can see the browser opening while navigating) var browser = await Puppeteer.LaunchAsync(new LaunchOptions { Headless = false, ExecutablePath = ChromePath, IgnoreHTTPSErrors =…
Inside Man
  • 4,194
  • 12
  • 59
  • 119
3
votes
0 answers

Is there any windows container guide for puppeteer?

I'm trying to use PuppeteerSharp with .NET Core3.1 in a windows container, is there some necessary dependencies for using puppeteer in windows container? When I use mcr.microsoft.com/windows/servercore:2004-amd64 image, seemed there's some…
WeihanLi
  • 87
  • 7
3
votes
0 answers

Intercepting requests sent by iframe

I am trying to intercept all web requests using by Puppeteer-Sharp but it is not working properly if the request sent by IFrame which is located on the page. For instance, After navigated this link, I clicked the video link since the video is in the…
leo
  • 445
  • 8
  • 25
3
votes
0 answers

PuppeteerSharp Target Crashed Exception on form submit

I've got a PuppeteerSharp function in my app that automates this website: https://dtucalculator.azurewebsites.net/ The goal is to fill out the form, by providing a CPU core value and a CSV with performance data (generated prior to this function) and…
Venator
  • 224
  • 3
  • 12
3
votes
1 answer

Puppeteer Sharp: Multiple Browsers Concurrently

Right now I'm using puppeteer (NodeJS library) to convert HTML into PDF documents. While this is "working", I'm porting over to Puppeteer-Sharp (C# library). I've got everything working, but I'm somewhat concerned with running multiple browsers…
3
votes
1 answer

Software freeze after Puppeteer launch

I have created a small application which should get some data from internet trought Puppeteer Sharp, the problem's that after I instantiate the browser the software freeze without no error. public partial class MainWindow : Window { public…
sfarzoso
  • 1,356
  • 2
  • 24
  • 65
3
votes
1 answer

How do I upload a file with Puppeteer Sharp?

I'm using Puppeteer Sharp to test my web app. My web app has a button that triggers an to let the user select a CSV file to upload. How do I use that to upload a file when testing via Puppeteer Sharp? Just clicking the button…
Wilka
  • 28,701
  • 14
  • 75
  • 97
3
votes
0 answers

Puppeteer LaunchAsync throwing exception

I have an existing ASPNET Web Application. The front end is HTML/JavaScript and the backend is WebAPI 2. We have been using NRECO.PDFGenerator to drop PDFs to the users, this uses a the QT browser and debugging is becoming a chore. I found…
Jeremy Bond
  • 159
  • 1
  • 15
3
votes
1 answer

How to set download behaviour in PuppeteerSharp?

I want to set download behaviour of browser for testing needs I had tried solution from this topic: puppeteer - how to set download location var browser = await StartNewChromeAsync(); //starting new chrome without extensions var pages = await…
Vabka
  • 31
  • 1
  • 4
3
votes
2 answers

Puppeteer Sharp strange behaviour

I'm trying to call Browser.NewPageAsync() in another static method, but when I call it, the method in which it was called just exits. partial class Program { static Browser Browser; static async Task StartBrowser() …
Steg_Brind
  • 51
  • 7
1
2
3
15 16