You construct an LiveHTML object with read_html_live() and then interact, like you're a human, using the methods described below. When debugging a scraping script it is particularly useful to use $view(), which will open a live preview of the site, and you can actually see each of the operations performed on the real site.
rvest provides relatively simple methods for scrolling, typing, and clicking. For richer interaction, you probably want to use a package that exposes a more powerful user interface, like selendir.
Examples
## Not run:# To retrieve data for this paginated site, we need to repeatedly push# the "Load More" buttonsess <- read_html_live("https://www.bodybuilding.com/exercises/finder")sess$view()sess %>% html_elements(".ExResult-row")%>% length()sess$click(".ExLoadMore-btn")sess %>% html_elements(".ExResult-row")%>% length()sess$click(".ExLoadMore-btn")sess %>% html_elements(".ExResult-row")%>% length()## End(Not run)
Public fields
session: Underlying chromote session object. For expert use only.