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
0
votes
1 answer

how to use puppeteer-sharp touchStart and touchEnd and touch move

The Touchscreen in puppeteer-sharp API just gives one method: TapAsync. but I need drag(touchStart and touchEnd and touch move). How can I do that?
dongdong
  • 77
  • 1
  • 9
0
votes
0 answers

how to use CDPSession with puppeteersharp intercept request

all I used puppeteersharp ,need to intercept request and response, when use blow code: page.Response += OnPageResponse, when the url is Navigation,cannot get the content,the error: Unable to get response body --->…
dongdong
  • 77
  • 1
  • 9
0
votes
1 answer

PupeteerSharp: Protocol error (Runtime.callFunctionOn): Session closed

I am tryng to execute the following code: await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision); #if DEBUG var chromeLocation = Path.Combine(context.FunctionDirectory,…
johnstaveley
  • 1,400
  • 1
  • 22
  • 46
0
votes
1 answer

puppeteer-sharp for server side HTML to PDF conversions

I found that puppeteer sharp is best way for server side, HTML to PDF conversion as it uses and downloads latest chrome and runs headless in background so the conversion is top class. tables and all else is rendered perfectly. However for running on…
Shahid Roofi Khan
  • 957
  • 1
  • 8
  • 19
0
votes
0 answers

PupeeteerSharp Does Not Work in ServiceFabric Stateless Service

I am developing web crawler which could render Javascript websites and so I decided to use PupeeteerSharp, a .NET port of popular Node.JS headless Chrome browser Pupeeteer API. I am running Service Fabric's local development cluster on Windows 10…
0
votes
1 answer

Add SVG picture on constants position but only in last page

I try to make invoice by Razor template, and convert it into PDF by chromium. I must add payment form to the last page, but in the constants position. .svg-container { position: absolute; top: 12cm; left: 0cm; …
0
votes
1 answer

Is there a remove page method corresponding to NewPageAsync() in PuppeteerSharp?

I keep the browser object as a singleton and would like to call NewPageAsync() for potentially thousands of urls. Is there a way to cleanup the page after it is used?
frosty
  • 2,421
  • 6
  • 26
  • 47
0
votes
1 answer

Remove all script elements using puppeteerSharp

I need to remove all script nodes from a page before saving the body of the page. How can I remove all script nodes from a page?
frosty
  • 2,421
  • 6
  • 26
  • 47
0
votes
1 answer

PuppeteerSharp evaluate expression to complex type?

Hi I am using PuppeteerSharp for the first time and am wondering if EvaulateExpressionAsync supports a way to convert to a complex c# object. So when i try to do something like this: var allResultsSelector = ".sortableTable.resultTable…
PBMe_HikeIt
  • 659
  • 8
  • 24
0
votes
1 answer

PuppeteerSharp throws ChromiumProcessException "Failed to create connection" when launching a browser

I'm using PuppeteerSharp to automate Chromium. When I try to launch a new browser, I sometimes get this error: PuppeteerSharp.ChromiumProcessException: Failed to create connection What's going on?
Eric Eskildsen
  • 4,269
  • 2
  • 38
  • 55
0
votes
1 answer

How to use PuppeteerSharp to get the value of performance.timeOrigin?

Using PuppeteerSharp, I am attempting to get the performance.timeOrigin value using the C# code below: JToken performanceTimeOriginString = await _page.EvaluateFunctionAsync("JSON.stringify(performance.timeOrigin);").ConfigureAwait(false); I have…
aBlaze
  • 2,436
  • 2
  • 31
  • 63
0
votes
1 answer

Scraping text into a class with puppeteer-sharp

I'm currently trying to recover text between tags on an HTML page with Puppeteer .NET but I can’t. Here’s the part I'm trying to recover: 12 I have already tried the function EvaluateFunction but I get nothing…
0
votes
1 answer

i am getting exception navigation failed because browser has disconnected

I'm getting an exception: Navigation failed because browser has disconnected. After my code gets executed, it will close by the using block. What is the main reason for the browser to disconnect?. Here's the exception that I get: Error on finding…
Siddu
  • 1
  • 2
0
votes
1 answer

How to launch PuppeteerSharp on server ubuntu 18.04.3 LTS? System.ComponentModel.Win32Exception (13): Permission denied

The program works on Windows well. I published it in .Net Core mode on Windows. But I get that error on Ubuntu: Unhandled exception. System.ComponentModel.Win32Exception (13): Permission denied at…
Сергей
  • 607
  • 1
  • 7
  • 16
0
votes
1 answer

How I can use PuppeteerSharp to click on Cookie Accept Button

I am now using PuppeteerSharp (Version 1.20.0) to visit one web site via proxy. If I enable global proxy settings, then I can use Google Chrome to visit the web site, but I can't see any Cookie Accept Button, or it had once, but after I clicked it,…
Jo zyd
  • 59
  • 3
  • 7