Skip to content

v0.18.0

Choose a tag to compare

@kenshaw kenshaw released this 04 Oct 00:53
· 84 commits to main since this release

This release moves all the example programs to the new API of chromedp v0.18.0. From now on, the tags of this repository follow the tags of chromedp: v0.18.x holds programs that use chromedp v0.18, and a point release such as v0.18.1 is a later change in this repository.

What changed

  • All the programs use the typed API: chromedp.Do and chromedp.Run return values, chromedp.Events reads events, and cdp.Call sends a protocol command.
  • The programs require chromedp v0.18.0, cdproto v0.157.4 and the module chromedp/remote v0.1.0.
  • Every program takes the flag -v to print the protocol messages. Every program except remote takes the flag -visible to show the browser window and keep the browser open. The variable CHROMEDP_VISIBLEWINDOW does the same.
  • New program tabs: it opens several tabs of one browser at the same time, shows that tabs share cookies unless a tab has its own browser context, and with -tabs-in-one-window it opens real tabs in one window and switches between them.
  • The program submit searches Wikipedia, because DuckDuckGo shows a challenge to a headless browser.
  • The program click clicks the summary of the example on pkg.go.dev, and the program upload runs from any directory.
  • The remote program and forecast -remote use remote.NewAllocator.
  • The README has the logo and the badges of chromedp, a table that shows which programs need the internet, and a note on how to run a program.
  • 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 most of them read live websites.

Notes

  • Some programs read live websites, and they can fail when a site changes. The programs cookie, headers, keys, proxy, subtree, tabs, upload and visible need no internet.
  • Run a program with go run, for example go run github.com/chromedp/examples/tabs@v0.18.0.