Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 768 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 768 Bytes

PureScript-Toppokki

Build Status

A binding to puppeteer to drive headless Chrome.

This module is incomplete, and you can help by submitting PRs.

Named for glorious Tteok-bokki.

Usage

import Toppokki as T

main = launchAff_ do
  browser <- T.launch
  page <- T.newPage browser
  T.goto (T.URL "https://example.com") page
  content <- T.content page
  Assert.assert "content is non-empty string" (String.length content > 0)
  _ <- T.screenshot {path: "./test/test.png"} page
  _ <- T.pdf {path: "./test/test.pdf"} page
  T.close browser