Skip to main content
Home

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
100%
Published
a week ago (0.5.3)
class Browser
implements AsyncDisposable

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.

Disconnects the browser from the websocket connection. This is useful if you want to keep the browser running but don't want to use it 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

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@astral/astral

Import symbol

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

Import directly with a jsr specifier

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