Skip to main content
Module

x/astral/README.md

A high-level puppeteer/playwright-like library for Deno
Go to Latest
File

Astral

Astral is a high-level puppeteer/playwright-like library that allows for control over a web browser for automation and testing. It is written from scratch with Deno in mind.

Documentation

All of our docs are written in markdown and rendered using Pyro. They can be viewed at astral.deno.dev.

Basic Usage

// Import Astral
import { launch } from "https://deno.land/x/astral/mod.ts";

// Launch the browser
const browser = await launch();

// Open a new page
const page = await browser.newPage("https://deno.land");

// Take a screenshot of the page and save that to disk
const screenshot = await page.screenshot();
Deno.writeFileSync("screenshot.png", screenshot);

// Close the browser
await browser.close();