press | R Documentation |
The press
function simulates pressing a key on the keyboard. It can either locate the element using a provided selector or by referencing an element previously located.
press(page_df, key, selector = NULL)
page_df |
A data frame containing page information, including the |
key |
A character string representing the key to press. |
selector |
(Optional) A character string representing the selector of the element.
If provided, the element will be located using the selector. If not provided, the |
The updated page_df
data frame.
# Create a page_df data frame
page_df <- data.frame(page_id = "my_page")
# Press a key using a selector
press(page_df, "Enter", selector = "#myElement")
# Press a key using a previously located element
page_df <- get_by_role(page_df, "textbox")
press(page_df, "Enter")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.