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

Puppeteer Sharp - Get element containing textContent

I'm trying to work out how to efficiently grab an element from a page that contains a specific string. The element is in an tag however it's classes/ids are randomly generated. The only way I can achieve this is by looping over every tag…
atoms
  • 2,993
  • 2
  • 22
  • 43
2
votes
2 answers

AspNet Core Razor View with PuppeteerSharp

Can we use PuppeteerSharp with Razor View. I want to send the HTML from Razor View inside AspNetCore app and get the output as PDF. Any references or code samples would be helpful
code_blue
  • 523
  • 2
  • 9
  • 19
2
votes
1 answer

WaitUntil not waiting / Get HTML on WaitForSelectorAsync

Having two problems that I would appreciate some advise on. Have used puppeteer in the past in node, but for some reason, running into a problem on the sharp version. Basically I'm crawling a webpage with a WaitUntil set to …
user2023918
  • 406
  • 1
  • 5
  • 12
2
votes
0 answers

Puppeteer-sharp hangs when running as webservice

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,…
Echoes137
  • 55
  • 7
2
votes
1 answer

Filtering Puppeter Sharp's ElementHandle[] with async linq

I've been rewritting my Selenium Application in Puppeter Sharp to learn more about that framework. My application runs on a site that i haven't access to modifyu its source, I've been only gathering some informations. Based on that, I wrote a…
Striter Alfa
  • 1,577
  • 1
  • 14
  • 31
2
votes
2 answers

Is there a way to add chrome-extension to PuppeteerSharp web driver?

How can I load a chrome extension to PuppeteerSharp's driver, similar to Selenium's option: ChromeOptions options = new ChromeOptions(); options.AddExtension(@"C:\a\path\to\file.zip");
Shai Ben-Dor
  • 533
  • 9
  • 21
2
votes
0 answers

puppeteer-sharp GoToAsync never resolved

var navigation = new NavigationOptions { Timeout = 0,WaitUntil = new [] { WaitUntilNavigation.Networkidle2 } }; await _page.GoToAsync(Url, navigation); I'm trying to test Angular SPA using puppeteer-sharp, but GoToAsync never resolves. Any…
1
vote
2 answers

Fastest (and cost efficient) method of running puppeteer in the cloud?

Currently, I have PuppeteerSharp running on a .NET Core Azure Function on Linux Consumption Plan. My local runs in 6-11 seconds. The azure function one runs in 25 - 40 seconds (this is after cold start). I'd like to bring back that time as much as…
1
vote
0 answers

Puppeteer sharp --no-sandbox option seems to not work on Ubuntu 20.04

I use an Azure VM on ubuntu 20.04. I would like to set up puppeteer sharp on this VM to use it with my dotnet core API. But, I awlays have this error : Failed to launch browser! [0408/085321.321602:ERROR:zygote_host_impl_linux.cc(100)] Running as…
Kuartz
  • 11
  • 1
1
vote
1 answer

How can I log JavaScript errors from Puppeteer-Sharp?

I have a C# app that uses Puppeteer-Sharp to convert HTML pages to PDF. Everything works great except for one issue. I have a fieldset within which a JavaScript file is used to move checkboxes from the right of the question to the left. When I view…
Erica Ackerman
  • 189
  • 1
  • 2
  • 11
1
vote
1 answer

puppeteer-sharp how to wait requests

how to wait request to be done before clicking on btn in puppeteer-sharp ? what I am trying to do is: 1.click on btn ( to make ajax request on website ) 2.wait request to be done 3.click on submit btn what I am doing now is: 1.click on btn ( to…
Mark Sameh
  • 21
  • 4
1
vote
0 answers

Missing method calling puppeteer LaunchAsync

When I try to use puppeteersharp in AX I get a error "Method not found: 'Void Microsoft.Extensions.Logging.LoggerExtensions.LogError(Microsoft.Extensions.Logging.ILogger, System.Exception, System.String, System.Object[])'." I have a custom DLL added…
Tweene
  • 257
  • 4
  • 16
1
vote
1 answer

How to wait until web page is loaded before scraping HTML using Puppeteer in headless mode? (C#)

I am trying to scrape from a website (www.Vinted.co.uk) which uses JavaScript to load data, unfortunately, the data loaded by JavaScript is what I'm scraping so I need to wait for the page to load before scraping so I can get the data required. At…
1
vote
0 answers

PuppeteerSharp downloads a csv with headless=false. How to do it with headless=true?

The C# statement that clicks the download button is: await frameContent2.ClickAsync("a[class='exportIconOld']"); The HTML tag is:
cjakeman
  • 223
  • 1
  • 2
  • 7
1
vote
0 answers

Is it possible to click button with PuppeteerSharp in headless mode?

I'm developing bot. He is working normally when headless mode is set to false. Whenever I start it with headless mode set to true, it throws timeout errors because it didn't find my selectors. I thought it would be maybe because of different…
SPIRINN
  • 61
  • 6