Skip to main content

Built and signed on GitHub Actions

Astral is the browser automation library for Deno

This package works with Deno
This package works with Deno
JSR Score
76%
Published
2 weeks ago (0.4.3)
class Browser

The browser class is instantiated when you run the launch method.

Examples

Example 1

const browser = await launch();

Constructors

new
Browser(
process: Deno.ChildProcess | null,
)

Properties

readonly
closed: boolean

Returns true if the browser and its websocket have benn closed

Returns true if browser is connected remotely instead of using a subprocess

readonly
pages: Page[]

Methods

close(): Promise<void>

Closes the browser and all of its pages (if any were opened). The Browser object itself is considered to be disposed and cannot be used anymore.

Promise which resolves to a new Page object.

Returns raw celestial bindings for the browser. Super unsafe unless you know what you're doing.

The browser's original user agent.

A string representing the browser name and version.

The browser's websocket endpoint

Add Package

deno add @astral/astral

Import symbol

import { Browser } from "@astral/astral";