check: Page class: Check a checkbox

View source: R/actions.R

checkR Documentation

Page class: Check a checkbox

Description

The check function checks a checkbox element. It can either locate the checkbox using a provided selector or by referencing an element previously located.

Usage

check(page_df, selector = NULL)

Arguments

page_df

A data frame containing page information, including the page_id column. This data frame is used to identify the page object where the checkbox should be checked.

selector

(Optional) A character string representing the selector of the checkbox. If provided, the checkbox will be located using the selector. If not provided, the elem_id column from page_df will be used to reference a previously located element.

Value

The updated page_df data frame.

Examples

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

# Check a checkbox using a selector
check(page_df, selector = "#myCheckbox")

# Check a checkbox using a previously located element
page_df <- get_by_role(page_df, "checkbox")
check(page_df)


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