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
0 answers

Host Header will cause Invalid Argument Error in Puppeteer

I'm using puppeteer with these settings: var browser = await Puppeteer.LaunchAsync(new LaunchOptions { Headless = true, ExecutablePath = ChromePath, IgnoreHTTPSErrors = true }); and I'm adding a Host header to my page: var dic = new…
Inside Man
  • 4,194
  • 12
  • 59
  • 119
0
votes
0 answers

How to improve PuppeteerSharp code to set input value and click button

I have to use PuppeteerSharp to login to one web site. The web page uses JavaScript to generate dynamic class, so each time when I tried to login, I can see different class name. So using Puppeteer Recorder is useless, I can't use its code to…
Jo zyd
  • 59
  • 3
  • 7
0
votes
0 answers

How to prevent PuppeteerSharp (HTML to PDF) from starting a table row in new page when using thead tag

Problem: When creating a PDF from a HTML template using PuppeteerSharp if you have a table with lots of data, it will create a new page if the next row doesn't fit in the current one even when there is plenty of space to start the second row, see…
Goca
  • 1,743
  • 2
  • 15
  • 36
0
votes
1 answer

Cannot access to folder outside a container

I wrote an application in C# which need to use a browser instance like chrome. I dockerized the application and the run using: sudo docker run -d --name myapp --restart=always -e BROWSER_PATH=/usr/bin/chromium-browser myimage The application start…
sfarzoso
  • 1,356
  • 2
  • 24
  • 65
0
votes
0 answers

How to use Puppeteer Sharp to click on specific element of a web page

I need to extract some data from this web page: https://www.sportsbetting.ag/live-betting I am using PuppeteerSharp (version 2.0.4) in Visual Studio 2019 for a C# project on Windows 10. I want to click on “Calendar” Tab, but I can’t finish my job,…
Jo zyd
  • 59
  • 3
  • 7
0
votes
1 answer

Implementing scroll to bottom in puppeteer sharp

I am struggling and was hoping someone could point me in the right direction. I am using puppeteer sharp in a .net desktop project. I want to make to page loaded into puppeteer to scroll to the bottom to deal with some lazy loading, and I have…
0
votes
0 answers

Check if Page Loaded Completely - Puppeteer C#

I use this code to wait the page to load complety: await page.GoToAsync(url, requestTimeout, new WaitUntilNavigation[] { WaitUntilNavigation.Networkidle0 …
Inside Man
  • 4,194
  • 12
  • 59
  • 119
0
votes
0 answers

Wait for menu animation (expanding div)

Using PuppeteerSharp, how can I wait for an element to finish expanding? Very similar to this other issue, I have a menu that slides open when clicked. I'm trying to click a link inside the expanding div. I tried waiting for Visible = true, but I…
RJB
  • 2,063
  • 5
  • 29
  • 34
0
votes
1 answer

I can't click any button that is in Power BI

Description: Good afternoon community, could you help me know how to click a button in a Power BI interface? I was trying this but it doesn't work for me await page.ClickAsync(".themableBackgroundColor"); Url Power…
0
votes
1 answer

Return Image base 64 without saving the file in hard drive, using puppeteersharp

I am using puppeteersharp to converting HTML to image: https://www.puppeteersharp.com/examples/index.html This is getting the HTMl and save the image, then I am going to return base64 image, I am looking to return image base64 without saving it in…
Alma
  • 3,780
  • 11
  • 42
  • 78
0
votes
1 answer

Creating a pdf with multiple pages per sheet

Is there a simple way to create pdfs with multiple pages per sheet using PuppeteerSharp (as per the option available when you print a pdf from Chrome) e.g. 1 / 2 / 4 / 6 / 9 / 16 pages per sheet?
Dev Chris
  • 1
  • 1
0
votes
1 answer

Cannot expand all the div in a page

I'm trying to expand all the divs available inside this page. In particular the div that shows mostra partite, eg: Looking to the html structure, we have the class: event__header--no-my-games for the collapsed divs, so I did: // page is the browser…
sfarzoso
  • 1,356
  • 2
  • 24
  • 65
0
votes
1 answer

How can I get all network requests and full response data when loading a page by Puppeteer-sharp?

I`m trying to get all network requests (as in the chrome dev tools network tab) by Puppeteer-sharp, like it works with JS Puppeteer: const page = await browser.newPage(); page.on('response', async (response) => {} I cant find the solution in…
0
votes
0 answers

Catching A2HS dialog with Puppeteer-sharp

I want to do a headless PWA installation. Using Puppeteer-sharp, I was able to click on the PWA Install button in the content to bring up the A2HS Dialog. I thought I could handle this dialog with the "Dialog" class since the beforeinstallprompt…
m mtl
  • 1
0
votes
1 answer

PuppeteerSharp requests to localhost?

I am not exactly sure if that is a pure PuppeteerSharp question or if it belongs to puppeteer in general. I setup a browser with a page and request interception. When the browser navigates to an external webpage like google I subscribed the page…