screenshot: Page class: Capture a screenshot

View source: R/page_utils.R

screenshotR Documentation

Page class: Capture a screenshot

Description

The screenshot function captures a screenshot of the current page within a web browser session and saves it to the specified path.

Usage

screenshot(page_df, path)

Arguments

page_df

A data frame containing page information, including the page_id column. This data frame is used to identify the page object for which the screenshot should be captured.

path

A character string representing the path where the screenshot should be saved.

Value

The updated page_df data frame.

Examples

# Create a page_df data frame
page_df <- data.frame(page_id = "my_page")

# Capture a screenshot using the page_df and save it to the specified path
screenshot(page_df, "path/to/save/screenshot.png")



benjaminguinaudeau/playwrightr documentation built on Nov. 8, 2023, 8:36 p.m.