drag_to | R Documentation |
The drag_to
function performs a drag and drop operation from the source element to the target element. It can either locate the elements using provided selectors or by referencing elements previously located.
drag_to(page_df, to_elem_id, selector = NULL)
page_df |
A data frame containing page information, including the |
to_elem_id |
A character string representing the |
selector |
(Optional) A character string representing the selector of the source element.
If provided, the source 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")
# Drag and drop an element using selectors
drag_to(page_df, to_elem_id = "myTargetElement", selector = "#mySourceElement")
# Drag and drop an element using previously located elements
page_df <- get_by_text(page_df, "Drag Me")
page_df <- get_by_text(page_df, "Drop Here")
drag_to(page_df, to_elem_id = page_df$elem_id[2])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.