Skip to content

v0.19.0

Choose a tag to compare

@kenshaw kenshaw released this 04 Oct 02:41
· 68 commits to main since this release

This release moves the example programs to chromedp v0.19.0 and adds 17 new programs, so there are 41 now. The tags of this repository follow the tags of chromedp: v0.19.x holds programs that use chromedp v0.19, and a point release such as v0.19.1 is a later change in this repository.

New programs

All the new programs use a local server and need no internet.

  • Network, sessions and files: intercept blocks, mocks and changes requests with the Fetch domain. session saves a login session and restores it in another browser. har writes a HAR file from the network events of a page. pdfstream reads a printed PDF as a stream. screencast saves the frames of a page as JPEG files.
  • Pages and events: frames reaches elements inside an iframe and a shadow root. dialogs answers alert, confirm, prompt and beforeunload dialogs. popups works with popups, several targets and browser contexts. eventsiter reads events with iterators and waits for the network to be idle. console reads the console and the uncaught exceptions.
  • New helpers of chromedp v0.19: dragdrop uses DragAndDrop for mouse and HTML5 drags. exposefunc calls Go functions from the page with ExposeFunc. pdfoptions prints PDF files with the new PrintToPDF options.
  • The typed API: structeval decodes JavaScript results into Go values. selectors compares the typed selectors. rawcall sends protocol commands that have no action. workers runs many jobs in parallel in one browser.
  • tabs was new in v0.18.0. It now has the flag -tabs-in-one-window.

Other changes

  • The programs require chromedp v0.19.0, cdproto v0.157.5 and chromedp/remote v0.1.0.
  • The program frames waits with WaitNotPresent, which works with a JSPath expression that gives null since chromedp v0.19.0.
  • The README names the programs that need no internet. The 26 programs that name no live site were run against the released versions before this tag.
  • GitHub Actions builds and vets every program on each push and pull request, and every night against the newest chromedp. The workflows do not run the programs, because many of them read live websites.

Notes

  • Some programs read live websites, and they can fail when a site changes.
  • Run a program with go run, for example go run github.com/chromedp/examples/dragdrop@v0.19.0.