Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Puppeteer!!!

Post Reply
shobits1
Posts: 25
Joined: Wed Mar 04, 2020 9:16 pm

Puppeteer!!!

Post by shobits1 »

while trying to find nice way to automate the browser I find puppeteer ( https://pptr.dev/ ) :
Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.

What can I do?
Most things that you can do manually in the browser can be done using Puppeteer! Here are a few examples to get you started:

Generate screenshots and PDFs of pages.
Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. "SSR" (Server-Side Rendering)).
Automate form submission, UI testing, keyboard input, etc.
Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.
Capture a timeline trace of your site to help diagnose performance issues.
Test Chrome Extensions.
Give it a spin: https://try-puppeteer.appspot.com/
are there any alternative to puppeteer for delphi ??!!
User avatar
salvadordf
Posts: 4042
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Puppeteer!!!

Post by salvadordf »

Hi,

It depends on what you need to do.

Some of the things you listed can be done using CEF4Delphi out of the box, some would need you to add some code to your application and some are not supported by CEF.

Puppeteer uses the DevTools protocol to control a full web browser while CEF4Delphi is a CEF wrapper which includes Chromium.
Puppeteer can do what the DevTools protocol allows you to do while CEF4Delphi can do what CEF supports.
shobits1
Posts: 25
Joined: Wed Mar 04, 2020 9:16 pm

Re: Puppeteer!!!

Post by shobits1 »

this is directly related to my previous post
What's the best approach for browser automation
https://www.briskbard.com/forum/viewtop ... f=8&t=1184
I'm trying to find tool/library that makes calling every step synchronous (or emulate it) so I wont bother my self with multi-threading/interprocess-communication,, and in some way have less error prone code,, I could start new project using nodejs,, but user interface will be nightmare for me.
Post Reply