module Playwright::Page

Overview

Page provides methods to interact with a single tab in a Browser, or an extension background page in Chromium. One Browser instance might have multiple Page instances. This example creates a page, navigates it to a URL, and then saves a screenshot:

The Page class emits various events (described below) which can be handled using any of Node's native EventEmitter methods, such as on, once or removeListener. This example logs a message for a single page load event:

To unsubscribe from events use the removeListener method:

Defined in:

playwright/page.cr

Instance Method Summary